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 Mar 14 23:21:48 2006 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 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: 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 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: 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 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 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 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 14 23:21:48 2006 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 -------------- 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 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:48 2006 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 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 14 23:21:48 2006 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 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 14 23:21:48 2006 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 -------------- 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 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 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 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 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 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:49 2006 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: Tue Mar 14 23:21:49 2006 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: Tue Mar 14 23:21:49 2006 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: Tue Mar 14 23:21:49 2006 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: Tue Mar 14 23:21:49 2006 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 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 14 23:21:49 2006 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.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: Tue Mar 14 23:21:49 2006 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 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 14 23:21:49 2006 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.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment.html 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 Mar 28 18:25:09 2006 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 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 18:25:09 2006 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: Tue Mar 28 18:25:09 2006 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 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 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 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 18:25:09 2006 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 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 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 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 28 18:25:09 2006 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 -------------- 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 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:09 2006 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 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 18:25:09 2006 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 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 28 18:25:09 2006 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 -------------- 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 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 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 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 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 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:09 2006 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: Tue Mar 28 18:25:09 2006 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: Tue Mar 28 18:25:09 2006 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: Tue Mar 28 18:25:09 2006 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: Tue Mar 28 18:25:09 2006 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 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 28 18:25:09 2006 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.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: Tue Mar 28 18:25:09 2006 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 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 28 18:25:09 2006 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.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0001.html 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 Mar 28 20:17:08 2006 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 01:42:14 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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 14:01:55 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: 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 06:53:13 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: 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 07:08:36 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 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 14:03:28 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 28 20:17:08 2006 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 -------------- 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 14:57:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:08 2006 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 01:28:00 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 20:17:08 2006 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 02:45:22 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 28 20:17:08 2006 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 -------------- 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 08:51:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 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 09:10:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 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 09:10:47 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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 14:15:04 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 28 20:17:08 2006 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.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: Tue Mar 28 20:17:08 2006 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 14:36:18 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 28 20:17:08 2006 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.qbang.org/pipermail/rxtx/attachments/20040220/a940fd3a/attachment-0002.html 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.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.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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-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-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-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-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 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-0032.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-0032.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-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 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-0033.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-0033.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-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 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-0034.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-0034.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-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 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-0035.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-0032.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-0035.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-0032.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 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-0036.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-0033.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-0036.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-0033.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 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-0037.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-0034.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-0037.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-0034.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 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-0038.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-0035.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-0038.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-0035.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 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-0039.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-0036.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-0039.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-0036.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 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-0040.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-0037.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-0040.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-0037.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 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-0041.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-0038.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-0041.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-0038.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 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-0042.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-0039.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-0042.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-0039.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 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-0043.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-0040.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-0043.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-0040.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 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-0044.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-0041.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-0044.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-0041.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 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-0045.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-0042.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-0045.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-0042.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 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-0046.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-0043.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-0046.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-0043.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 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-0047.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-0044.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-0047.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-0044.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 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-0048.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-0045.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-0048.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-0045.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 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-0049.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-0046.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-0049.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-0046.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 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-0050.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-0047.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-0050.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-0047.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 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-0051.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-0048.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-0051.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-0048.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 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-0052.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-0049.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-0052.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-0049.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 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-0053.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-0050.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-0053.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-0050.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 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-0054.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-0051.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-0054.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-0051.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 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-0055.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-0052.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-0055.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-0052.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 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-0056.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-0053.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-0056.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-0053.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 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-0057.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-0054.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-0057.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-0054.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 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-0058.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-0055.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-0058.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-0055.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 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-0059.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-0056.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-0059.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-0056.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 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-0060.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-0057.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-0060.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-0057.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 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-0061.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-0058.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-0061.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-0058.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 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-0062.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-0059.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-0062.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-0059.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 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-0063.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-0060.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-0063.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-0060.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-0063.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-0063.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-0063.html 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-0064.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-0061.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-0064.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-0061.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-0064.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-0064.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-0064.html 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-0065.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-0062.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-0065.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-0062.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-0065.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-0065.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-0065.html 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-0066.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-0063.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-0066.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-0063.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-0066.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-0066.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-0066.html 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-0067.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-0064.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-0067.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-0064.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-0067.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-0067.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-0067.html 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-0068.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-0065.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-0068.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-0065.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-0068.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-0068.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-0068.html 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-0069.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-0066.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-0069.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-0066.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-0069.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-0069.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-0069.html 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-0070.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-0067.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-0070.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-0067.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-0070.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-0070.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-0070.html 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-0071.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-0068.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-0071.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-0068.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-0071.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-0071.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-0071.html 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-0072.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-0069.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-0072.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-0069.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-0072.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-0072.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-0072.html 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-0073.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-0070.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-0073.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-0070.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-0073.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-0073.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-0073.html 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-0074.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-0071.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-0074.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-0071.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-0074.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-0074.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-0074.html 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-0075.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-0072.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-0075.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-0072.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-0075.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-0075.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-0075.html 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-0076.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-0073.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-0076.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-0073.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-0076.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-0076.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-0076.html 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-0077.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-0074.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-0077.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-0074.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-0077.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-0077.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-0077.html 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-0078.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-0075.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-0078.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-0075.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-0078.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-0078.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-0078.html 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-0079.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-0076.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-0079.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-0076.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-0079.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-0079.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-0079.html 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-0080.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-0077.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-0080.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-0077.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-0080.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-0080.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-0080.html 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-0081.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-0078.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-0081.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-0078.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-0081.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-0081.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-0081.html 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-0082.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-0079.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-0082.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-0079.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-0082.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-0082.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-0082.html 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-0083.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-0080.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-0083.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-0080.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-0083.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-0083.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-0083.html 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-0084.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-0081.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-0084.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-0081.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-0084.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-0084.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-0084.html 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-0085.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-0082.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-0085.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-0082.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-0085.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-0085.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-0085.html 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-0086.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-0083.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-0086.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-0083.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-0086.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-0086.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-0086.html 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-0087.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-0084.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-0087.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-0084.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-0087.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-0087.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-0087.html 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-0088.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-0085.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-0088.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-0085.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-0088.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-0088.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-0088.html 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-0089.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-0086.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-0089.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-0086.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-0089.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-0089.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-0089.html 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-0090.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-0087.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-0090.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-0087.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-0090.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-0090.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-0090.html 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-0091.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-0088.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-0091.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-0088.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-0091.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-0091.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-0091.html 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-0092.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-0089.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-0092.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-0089.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-0092.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-0092.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-0092.html 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-0093.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-0090.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-0093.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-0090.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-0093.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-0093.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-0093.html 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-0094.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-0091.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-0094.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-0091.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-0094.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-0094.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-0094.html 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-0095.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-0092.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-0095.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-0092.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-0095.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-0095.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-0095.html 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-0096.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-0093.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-0096.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-0093.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-0096.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-0096.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-0096.html 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-0097.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-0094.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-0097.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-0094.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-0097.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-0097.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-0097.html 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-0098.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-0095.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-0098.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-0095.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-0098.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-0098.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-0098.html 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-0099.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-0096.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-0099.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-0096.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-0099.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-0099.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-0099.html 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-0100.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-0097.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-0100.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-0097.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-0100.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-0100.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-0100.html 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-0101.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-0098.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-0101.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-0098.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-0101.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-0101.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-0101.html 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-0102.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-0099.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-0102.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-0099.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-0102.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-0102.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-0102.html 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-0103.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-0100.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-0103.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-0100.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-0103.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-0103.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-0103.html 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-0104.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-0101.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-0104.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-0101.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-0104.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-0104.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-0104.html 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-0105.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-0102.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-0105.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-0102.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-0105.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-0105.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-0105.html 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-0106.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-0103.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-0106.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-0103.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-0106.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-0106.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-0106.html 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-0107.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-0104.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-0107.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-0104.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-0107.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-0107.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-0107.html 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-0108.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-0105.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-0108.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-0105.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-0108.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-0108.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-0108.html 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-0109.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-0106.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-0109.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-0106.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-0109.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-0109.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-0109.html 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-0110.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-0107.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-0110.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-0107.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-0110.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-0110.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-0110.html 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-0111.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-0108.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-0111.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-0108.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-0111.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-0111.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-0111.html 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-0112.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-0109.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-0112.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-0109.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-0112.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-0112.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-0112.html 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-0113.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-0110.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-0113.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-0110.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-0113.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-0113.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-0113.html 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-0114.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-0111.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-0114.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-0111.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-0114.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-0114.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-0114.html 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-0115.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-0112.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-0115.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-0112.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-0115.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-0115.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-0115.html 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-0116.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-0113.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-0116.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-0113.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-0116.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-0116.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-0116.html 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-0117.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-0114.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-0117.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-0114.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-0117.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-0117.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-0117.html 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-0118.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-0115.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-0118.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-0115.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-0118.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-0118.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-0118.html 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-0119.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-0116.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-0119.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-0116.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-0119.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-0119.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-0119.html 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-0120.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-0117.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-0120.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-0117.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-0120.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-0120.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-0120.html 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-0121.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-0118.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-0121.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-0118.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-0121.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-0121.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-0121.html 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-0122.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-0119.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-0122.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-0119.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-0122.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-0122.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-0122.html 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-0123.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-0120.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-0123.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-0120.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-0123.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-0123.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-0123.html 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-0124.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-0121.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-0124.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-0121.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-0124.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-0124.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-0124.html 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-0125.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-0122.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-0125.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-0122.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-0125.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-0125.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-0125.html 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-0126.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-0123.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-0126.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-0123.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-0126.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-0126.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-0126.html 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-0127.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-0124.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-0127.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-0124.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-0127.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-0127.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-0127.html 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-0128.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-0125.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-0128.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-0125.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-0128.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-0128.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-0128.html 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-0129.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-0126.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-0129.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-0126.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-0129.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-0129.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-0129.html 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-0130.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-0127.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-0130.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-0127.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-0130.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-0130.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-0130.html 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-0131.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-0128.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-0131.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-0128.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-0131.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-0131.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-0131.html 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-0132.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-0129.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-0132.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-0129.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-0132.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-0132.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-0132.html 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-0133.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-0130.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-0133.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-0130.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-0133.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-0133.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-0133.html 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-0134.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-0131.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-0134.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-0131.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-0134.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-0134.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-0134.html 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-0135.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-0132.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-0135.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-0132.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-0135.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-0135.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-0135.html 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-0136.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-0133.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-0136.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-0133.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: [R