From frank-list at uol.com.br Fri Jul 1 18:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri Jul 1 18:39:31 2005 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 19:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 1 19:22:09 2005 Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi@qbang.org From frank-list at uol.com.br Fri Jul 1 19:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri Jul 1 19:26:37 2005 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 20:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 1 20:09:23 2005 Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Tue Jul 5 09:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jul 5 09:34:20 2005 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi@qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 17:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue Jul 5 17:10:13 2005 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 18:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jul 5 18:22:12 2005 Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi@qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 19:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Tue Jul 5 18:28:10 2005 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes.vcf From taj at www.linux.org.uk Tue Jul 5 18:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jul 5 18:44:38 2005 Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi@qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 20:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue Jul 5 20:13:07 2005 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 20:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jul 5 20:21:17 2005 Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi@qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 21:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue Jul 5 21:18:26 2005 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces@mail.electronpusher.org > [mailto:rxtx-bounces@mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Wed Jul 6 02:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed Jul 6 02:57:50 2005 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 11:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed Jul 6 11:35:01 2005 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 12:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed Jul 6 12:07:52 2005 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 20:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jul 6 20:38:14 2005 Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi@qbang.org From whokilledhomer at yahoo.com Thu Jul 7 19:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu Jul 7 19:05:04 2005 Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 19:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Jul 7 19:18:30 2005 Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi@qbang.org From whokilledhomer at yahoo.com Thu Jul 7 22:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu Jul 7 22:17:56 2005 Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 22:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Jul 7 22:37:28 2005 Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Fri Jul 8 04:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 8 04:55:06 2005 Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces@mail.electronpusher.org > > [mailto:rxtx-bounces@mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Fri Jul 8 14:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri Jul 8 14:06:32 2005 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 21:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 8 21:03:29 2005 Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Sat Jul 9 12:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat Jul 9 12:46:11 2005 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi@qbang.org From lyon at docjava.com Sat Jul 9 13:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat Jul 9 13:38:01 2005 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 15:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat Jul 9 14:59:41 2005 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 23:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat Jul 9 23:19:47 2005 Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi@qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 21:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun Jul 10 21:22:02 2005 Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Mon Jul 11 13:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon Jul 11 13:20:21 2005 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Tue Jul 12 00:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jul 12 00:43:50 2005 Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi@qbang.org From Scott.Hughes at dalsemi.com Tue Jul 12 00:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue Jul 12 00:50:50 2005 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces@mail.electronpusher.org > [mailto:rxtx-bounces@mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon@docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 12 06:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jul 12 06:13:11 2005 Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces@mail.electronpusher.org > > [mailto:rxtx-bounces@mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon@docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi@qbang.org From diego at grupoclave.com Tue Jul 12 14:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue Jul 12 14:56:25 2005 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0001.html From ricardo.trindade at emation.pt Tue Jul 12 16:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Jul 12 16:08:05 2005 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment.htm From taj at www.linux.org.uk Tue Jul 12 18:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jul 12 18:32:21 2005 Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi@qbang.org From foldedplaces at hotmail.com Tue Jul 12 21:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue Jul 12 21:01:53 2005 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 07:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jul 13 07:05:01 2005 Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Wed Jul 13 07:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jul 13 07:24:25 2005 Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Wed Jul 13 12:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed Jul 13 12:14:12 2005 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 14:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed Jul 13 14:05:53 2005 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 16:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed Jul 13 16:27:49 2005 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050713/348bc943/attachment.htm From ricardo.trindade at emation.pt Wed Jul 13 16:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed Jul 13 16:37:05 2005 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment.htm From ricardo.trindade at emation.pt Wed Jul 13 16:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed Jul 13 16:47:49 2005 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment.htm From taj at www.linux.org.uk Wed Jul 13 18:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jul 13 18:01:16 2005 Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Wed Jul 13 18:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jul 13 18:42:05 2005 Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Wed Jul 13 18:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jul 13 18:48:30 2005 Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder@build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Wed Jul 13 19:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jul 13 19:17:23 2005 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi@qbang.org From ricardo.trindade at emation.pt Wed Jul 13 23:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed Jul 13 23:26:29 2005 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment.htm From taj at www.linux.org.uk Wed Jul 13 23:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jul 13 23:46:07 2005 Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi@qbang.org From vlado.handziski at gmail.com Thu Jul 14 10:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu Jul 14 10:15:09 2005 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 19:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu Jul 14 18:56:18 2005 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 22:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu Jul 14 21:59:41 2005 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 22:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu Jul 14 22:03:27 2005 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 13:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon Jul 18 13:14:59 2005 Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 14:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue Jul 19 14:56:20 2005 Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 15:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue Jul 19 15:12:30 2005 Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 21:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue Jul 19 21:24:59 2005 Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment.html From andre.gouvea at gmail.com Wed Jul 20 16:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed Jul 20 16:06:04 2005 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment.htm From lyon at docjava.com Mon Jul 25 12:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon Jul 25 12:46:07 2005 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 17:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon Jul 25 17:34:23 2005 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 15:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon Jul 25 22:33:58 2005 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 18:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon Jul 25 22:34:14 2005 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Tue Jul 26 02:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Tue Jul 26 05:41:12 2005 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 09:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue Jul 26 09:08:48 2005 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Fri Jul 29 00:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu Jul 28 23:58:46 2005 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Fri Jul 29 00:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 29 00:15:38 2005 Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi@qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0395.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0395.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0144.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0395.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0395.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0395.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0395.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0395.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0395.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0396.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0396.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0395.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0396.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0396.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0396.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0396.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0396.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0396.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0397.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0397.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0396.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0397.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0397.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0397.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0397.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0397.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0397.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0398.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0398.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0397.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0398.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0398.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0398.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0398.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0398.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0398.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0399.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0399.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0398.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0399.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0399.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0399.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0399.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0399.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0399.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0400.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0400.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0399.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0400.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0400.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0400.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0400.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0400.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0400.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0401.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0401.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0400.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0401.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0401.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0401.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0401.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0401.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0401.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0402.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0402.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0401.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0402.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0402.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0402.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0402.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0402.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0402.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0403.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0403.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0402.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0403.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0403.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0403.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0403.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0403.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0403.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0404.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0404.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0403.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0404.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0404.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0404.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0404.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0404.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0404.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0001.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0001.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0001.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0001.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0001.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0001.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0001.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0001.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0001.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0002.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0002.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0002.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0002.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0002.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0002.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0002.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0002.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0002.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0003.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0003.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0003.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0003.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0003.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0003.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0003.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0003.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0003.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0004.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0004.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0004.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0004.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0004.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0004.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0004.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0004.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0004.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0005.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0005.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0005.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0005.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0005.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0005.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0005.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0005.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0005.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0006.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0006.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0006.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0006.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0006.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0006.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0006.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0006.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0006.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0007.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0007.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0007.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0007.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0007.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0007.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0007.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0007.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0007.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0008.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0008.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0008.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0008.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0008.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0008.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0008.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0008.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0008.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0009.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0009.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0009.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0009.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0009.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0009.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0009.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0009.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0009.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0010.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0010.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0010.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0010.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0010.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0010.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0010.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0010.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0010.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0001.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0001.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0001.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0001.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0001.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0001.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0001.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0001.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0001.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0002.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0002.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0002.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0002.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0002.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0002.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0002.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0002.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0002.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0003.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0003.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0003.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0003.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0003.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0003.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0003.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0003.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0003.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0004.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0004.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0004.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0004.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0004.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0004.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0004.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0004.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0004.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0005.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0005.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0005.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0005.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0005.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0005.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0005.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0005.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0005.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0006.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0006.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0006.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0006.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0006.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0006.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0006.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0006.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0006.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0007.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0007.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0007.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0007.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0007.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0007.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0007.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0007.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0007.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0008.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0008.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0008.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0008.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0008.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0008.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0008.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0008.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0008.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0009.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0009.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0009.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0009.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0009.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0009.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0009.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0009.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0009.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0010.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0010.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0010.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0010.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0010.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0010.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0010.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0010.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0010.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0001.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0001.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0001.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0001.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0001.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0001.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0001.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0001.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0001.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0002.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0002.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0002.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0002.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0002.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0002.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0002.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0002.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0002.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0003.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0003.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0003.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0003.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0003.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0003.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0003.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0003.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0003.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0004.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0004.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0004.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0004.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0004.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0004.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0004.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0004.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0004.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0005.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0005.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0005.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0005.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0005.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0005.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0005.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0005.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0005.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0006.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0006.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0006.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0006.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0006.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0006.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0006.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0006.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0006.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0007.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0007.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0007.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0007.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0007.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0007.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0007.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0007.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0007.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0008.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0008.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0008.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0008.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0008.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0008.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0008.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0008.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0008.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0009.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0009.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0009.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0009.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0009.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0009.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0009.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0009.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0009.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0010.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0010.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0010.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0010.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0010.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0010.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0010.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0010.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0010.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0011.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make ----------- BUT...is there still a bug? Now, when I run the program under java web start, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver could there be an import left somewhere in the RXTXcomm.jar or a load in the native lib? I could not find it. You know, this worked fine under Linux.... Here is the properties file: more /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver Hmm. Is anyone else getting this error? Thanks! - Doug From taj at www.linux.org.uk Fri Jul 8 14:07:52 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 21:07:52 +0100 (BST) Subject: [Rxtx] the build works, but there is still a bug somewhere.... In-Reply-To: References: Message-ID: On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > Hi All, > The new CVS build works great, I tried it on two macs; > > Thanks Trent! > > Here is a build script that you can run to do the build. > The password is mousy. > Just cat it into a file, called build, then run: > sh build > > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > > ----------- BUT...is there still a bug? > Now, when I run the program under java web start, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > could there be an import left somewhere in the RXTXcomm.jar or > a load in the native lib? I could not find it. > > You know, this worked fine under Linux.... > Here is the properties file: > more > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > Hmm. Is anyone else getting this error? > Yes but I've not seen exactly how to reproduce it. One thing I note is you have a properties file. That is not needed with rxtx 2.1. You should also not need Sun's comm.jar installed. I've tried a simple test here and I am not reproducing the problem. cube:~/rxtx-devel/build taj$ cat EnumPorts.java import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } cube:~/rxtx-devel/build taj$ java EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem cube:~/rxtx-devel/build taj$ uname -a Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc Port Enumeration is done in RXTXCommDriver so it is obviously loading. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 05:48:46 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 07:48:46 -0400 Subject: [Rxtx] An aversion to version. In-Reply-To: References: Message-ID: Hi Trent, Well, for a good time, I moved the Java files in the GNU IO package to the Intellij IDE for compilation and debugging. What I find is that things are not compiling properly. There are no syntax errors, but static elements cannot load at compilation time. This has to do with a mismatch between the native lib and the code in the jar files... IMHO. I added the following lines to test the loading: public class RXTXCommDriverInterface implements CommDriverInterface { public static void main(String[] args) { System.out.println("hello world"); } ....When I run the main method, code like: private final static boolean debug = true; private final static boolean devel = true; static { if (debug) System.out.println("RXTXCommDriverInterface {}"); System.loadLibrary("rxtxSerial"); /* Perform a crude check to make sure people don't mix versions of the Jar and native lib Mixing the libs can create a nightmare. It could be possible to move this over to RXTXVersion but All we want to do is warn people when first loading the Library. */ String JarVersion = RXTXVersion.getVersion(); Gets executed. This causes errors. connot resolve symbol method nativeGetVersion() cannot access javax.comm.ParallelPort, file javax/comm/ParallelPort.class not found. Could I be linking the wrong version of the native method code without knowing it? Perhaps we need to increment the native method version in order to identify any divergence between the jar version and the native methods. On the other hand, old versions of the code did not have a native implementation of the getVersion method...so this may be linking to an old version and thus cannot get the version. Because, if it were the right version, we could get the version, but then there would be no error (no kidding!). Possibly, I am just doing something dumb. It looks like version checking is not getting the chance to detect the difference between the native version and the jar file, since there is no native version of get version. IMHO. Thanks! - Doug >On Fri, 8 Jul 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> The new CVS build works great, I tried it on two macs; >> >> Thanks Trent! >> >> Here is a build script that you can run to do the build. >> The password is mousy. >> Just cat it into a file, called build, then run: >> sh build >> >> CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot >> cvs login >> cvs checkout -r commapi-0-0-1 rxtx-devel >> cd rxtx-devel >> mkdir build && cd build >> ../configure && make >> >> >> ----------- BUT...is there still a bug? >> Now, when I run the program under java web start, I get: >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while >> loading gnu.io.RXTXCommDriver >> >> could there be an import left somewhere in the RXTXcomm.jar or >> a load in the native lib? I could not find it. >> >> You know, this worked fine under Linux.... >> Here is the properties file: >> more >> >>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/javax.comm.properties >> Driver=gnu.io.RXTXCommDriver >> >> Hmm. Is anyone else getting this error? >> > >Yes but I've not seen exactly how to reproduce it. One thing I note is >you have a properties file. That is not needed with rxtx 2.1. You should >also not need Sun's comm.jar installed. > >I've tried a simple test here and I am not reproducing the problem. > >cube:~/rxtx-devel/build taj$ cat EnumPorts.java >import java.io.*; >import java.util.*; >import gnu.io.*; >public class EnumPorts { > static Enumeration portList; > static CommPortIdentifier portId; > public static void main(String[] args) { > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) >portList.nextElement(); > System.out.println(portId.getName()); > } > } >} > >cube:~/rxtx-devel/build taj$ java EnumPorts >Experimental: JNI_OnLoad called. >Devel Library >========================================= >Native lib Version = RXTX-2.1-7pre20 >Java lib Version = RXTX-2.1-7pre20 >/dev/tty.modem >/dev/cu.modem >cube:~/rxtx-devel/build taj$ uname -a >Darwin cube.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 >PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc > > >Port Enumeration is done in RXTXCommDriver so it is obviously loading. > >-- >Trent Jarvi >tjarvi at qbang.org From lyon at docjava.com Sat Jul 9 06:40:43 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 08:40:43 -0400 Subject: [Rxtx] You want versions, we got versions! Message-ID: Hi Trent, I did a comparison of all the librxtx libs in the system on the cube: cube.local{lyon}37: source foo -rw-r--r-- 1 root admin 123440 2 Jan 2004 /Library/Java/Extensions/librxtxSerial.jnilib -rw-r--r-- 1 root wheel 123440 2 Jan 2004 /System/Library/Extensions/librxtxSerial.jnilib -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib* -rwxr-xr-x 1 taj staff 124368 8 Jul 02:14 /user/taj/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-r--r-- 1 taj staff 118684 23 Sep 2004 /user/taj/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rwxrwxr-x 1 lyon staff 57080 8 Jul 08:27 /Users/lyon/serial/rxtx-devel/build/powerpc-apple-darwin7.7.0/librxtxSerial.jnilib* -rw-rw-r-- 1 lyon staff 118684 23 Sep 2004 /Users/lyon/serial/rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib -rw-rw-r-- 1 lyon staff 123440 7 Jan 2005 /Users/lyon/www/html/book/cgij/code/jnlp/native/macosx/librxtxSerial.jnilib Perhaps this is the one for me: -rwxr-xr-x 1 taj staff 124368 8 Jul 15:29 /user/taj/rxtx-devel/build/librxtxSerial.jnilib But when I do a build off of the CVS download, I get: -rwxrwxr-x 1 lyon staff 57080 Jul 9 08:34 librxtxSerial.jnilib This is really different! Is it possible that the CVS download is not in sync with the most recent version of the native code? It looks like we are getting the old code warrior version in the CVS, right? Thanks! - Doug From lyon at docjava.com Sat Jul 9 08:02:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 09 Jul 2005 10:02:21 -0400 Subject: [Rxtx] Where, oh where do the native libs go? Message-ID: Hi Trent, I am trying to make sure that I am installing native libs, like: librxtxSerial.jnilib In the correct places, on a mac. Here is a list: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib /System/Library/Java/Extensions/librxtxSerial.jnilib /usr/lib/java/librxtxSerial.jnilib Also, I had to remove the: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar So that I could control which RXTXcomm.jar was loaded into the class path. I am not sure, but I think that this is the one that gets loaded when it appears in the extensions, not the one under development. Getting the jar and native libs to match up is key. However, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver I think we need a better means of version detection. Perhaps a console message indicating the version loaded....I don't know. - Doug From taj at www.linux.org.uk Sat Jul 9 16:24:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 9 Jul 2005 23:24:10 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote:y > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > Again, I'm not seeing this with current CVS. Nothing has changed. cube:~/rxtx-devel/build taj$ java -classpath .:./RXTXcomm.jar EnumPorts Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem /dev/cu.modem Could you modify the attached program to reproduce the problem? The version numbers have been changed in the above. Thats all. The patch against cvs is attached. The bits about various files in /user/taj should be expected as I was developing in that directory. For you use of the library, those files are out of your scope. They dont hurt anything and mentioning them only confuses the issue. Java does not look there unless told to. Let me know how the attached program works. The versions will change when we release the CVS but between builds, you just have to know your working environment. Right now, I dont think it is the rxtx library thats wrong. There is no reference code to javax.comm in the rxtx 2.1 source that I can find. I think the problem is you have Sun's Comm.jar installed someplace but like I said, I have yet to reproduce the error. The native library sizes can change significantly depending upon how much debugging information is in them. This information is usually striped out during install and can cut the size in half or more. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- import java.io.*; import java.util.*; import gnu.io.*; public class EnumPorts { static Enumeration portList; static CommPortIdentifier portId; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(portId.getName()); } } } -------------- next part -------------- ? EnumPorts.java ? RXTXcomm.jar ? screwy-verysions.patch Index: src/RXTXVersion.java =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/RXTXVersion.java,v retrieving revision 1.2.2.32 diff -r1.2.2.32 RXTXVersion.java 40c40 < Version = "RXTX-2.1-7pre20"; --- > Version = "R-testing-XTX-2.1-7pre20"; Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.186 diff -r1.46.2.186 SerialImp.c 4154c4154 < return (*env)->NewStringUTF( env, "RXTX-2.1-7pre20" ); --- > return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20" ); From taj at www.linux.org.uk Sun Jul 10 14:26:27 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 10 Jul 2005 21:26:27 +0100 (BST) Subject: [Rxtx] Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when > it appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while > loading gnu.io.RXTXCommDriver > This error is caused by installing rxtx 2.0 (jcl.jar) on the same system one tries to use rxtx 2.1 (RXTXcomm.jar) and then trying to use rxtx 2.1. Some check is in order here. I cant think of any obvious way to know what the end users is trying to do though. If someone has an idea, I'm open to suggestions. Perhaps rxtx 2.1 should change package names. That is problematic for current applications though. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jul 11 06:23:01 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 11 Jul 2005 08:23:01 -0400 Subject: [Rxtx] IT WORKS (sort of) Message-ID: Trent: Thanks a bunch for your help with this. I must have run an installer that placed a jcl.jar into the lib extensions without my realizing it. All this time I was debugging with an old version of the libs. You know, if we had a class for testing lib versions, we could run it with a given library path, just to make sure the versions were correct. The makefile could say something like: test: java -jar rxtx.jar java -jar rxtx.jar -Djava.library.path=. Main Then we could be sure that all the shared object libs and class path come from the same working directory. As to checking what might be loaded, by accident, I would think that the Java part of the library should have a java program that is independent of the loading of the native lib. This way you can run: java -jar rxtx.jar And it prints info about the lib, without loading the native lib. To print info about the native lib and the java lib, you might write: java -jar rxtx.jar -Djava.library.path=. Main This could even enumerate the ports, showing the proper connectivity. Thanks again for your help with this. Now, I am getting a new error: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 trying to open:/dev/tty.modem gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.Utils.init(Utils.java:64) at serialPort.Utils.(Utils.java:38) at serialPort.Utils.getSerialPortUtils(Utils.java:103) at addbk.JAddressBook.ViewPanel.dial(ViewPanel.java:141) at addbk.JAddressBook.ViewPanel.access$300(ViewPanel.java:15) at addbk.JAddressBook.ViewPanel$10.run(ViewPanel.java:121) at gui.run.RunButton.actionPerformed(RunButton.java:45) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5166) at java.awt.Component.processEvent(Component.java:4963) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172) at java.awt.Container.dispatchEventImpl(Container.java:1657) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I just installed the Keyspan19HS, to see if this might be related to the internal modem that I am using, but I got exactly the same error. In my: /private/var/spool/uucp directory I found a series of lock files. I deleted them all...but I still get the gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at serialPort.PortTest.main(PortTest.java:48) Also, there are no lock files left in: /private/var/spool/uucp Any ideas? Thanks! - Doug From taj at www.linux.org.uk Mon Jul 11 17:48:18 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 00:48:18 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: References: Message-ID: On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > Trent: > Thanks a bunch for your help with this. > I must have run an installer that placed a jcl.jar into > the lib extensions without my realizing it. All this time > I was debugging with an old version of the libs. > > > You know, if we had a class for testing lib versions, we could > run it with a given library path, just to make sure the versions > were correct. > > The makefile could say something like: > > test: > java -jar rxtx.jar > java -jar rxtx.jar -Djava.library.path=. Main > > Then we could be sure that all the shared object libs and class path > come from the same working directory. > > As to checking what might be loaded, by accident, > I would think that the Java part of the library should have a java program > that is independent of the loading of the native lib. > This way you can run: > java -jar rxtx.jar > And it prints info about the lib, without loading the native lib. > To print info about the native lib and the java lib, you might write: > java -jar rxtx.jar -Djava.library.path=. Main > This could even enumerate the ports, showing the proper connectivity. > > Thanks again for your help with this. Now, I am getting a new error: > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre20 > Java lib Version = RXTX-2.1-7pre20 > trying to open:/dev/tty.modem > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) [snip] > > Any ideas? > The user needs to be in group uucp to work. Again the Enumerate test application should be enough to see if things are working. You can also compile rxtx with locking disabled at configure time. The auto* does not currently mess with the system configuration like the GUI IDE setup does. That means you need to do this yourself right now. I don't want to be messing with these settings on other peoples machines. The script code is in configure.in but is commented out. #fix_mac_groups() #{ #this is what the Mac OS X installer does... untested # sudo mkdir /var/spool/uucp # sudo chmod 775 /var/spool/uucp # sudo niutil -destroyval / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` # sudo niutil -appendprop / /groups/uucp users `sudo id -p | grep 'login' | sed 's/login.//'` #} The error is indicating that for some reason, rxtx is not able to lock the file and does think there is an active PID that has a lockfile. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Mon Jul 11 17:52:40 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Mon, 11 Jul 2005 18:52:40 -0500 Subject: [Rxtx] IT WORKS (sort of) Message-ID: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Monday, July 11, 2005 6:48 PM > To: Java RXTX discussion > Cc: lyon at docjava.com > Subject: Re: [Rxtx] IT WORKS (sort of) > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > Trent: > > Thanks a bunch for your help with this. > > I must have run an installer that placed a jcl.jar into > > the lib extensions without my realizing it. All this time > > I was debugging with an old version of the libs. > > > > > > You know, if we had a class for testing lib versions, we could > > run it with a given library path, just to make sure the versions > > were correct. > > > > The makefile could say something like: > > > > test: > > java -jar rxtx.jar > > java -jar rxtx.jar -Djava.library.path=. Main > > > > Then we could be sure that all the shared object libs and class path > > come from the same working directory. > > > > As to checking what might be loaded, by accident, > > I would think that the Java part of the library should have > a java program > > that is independent of the loading of the native lib. > > This way you can run: > > java -jar rxtx.jar > > And it prints info about the lib, without loading the native lib. > > To print info about the native lib and the java lib, you > might write: > > java -jar rxtx.jar -Djava.library.path=. Main > > This could even enumerate the ports, showing the proper > connectivity. > > > > Thanks again for your help with this. Now, I am getting a new error: > > Devel Library > > ========================================= > > Native lib Version = RXTX-2.1-7pre20 > > Java lib Version = RXTX-2.1-7pre20 > > trying to open:/dev/tty.modem > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > [snip] > > > > Any ideas? > > > > The user needs to be in group uucp to work. Again the Enumerate test > application should be enough to see if things are working. > You can also > compile rxtx with locking disabled at configure time. > > The auto* does not currently mess with the system > configuration like the > GUI IDE setup does. That means you need to do this yourself > right now. I > don't want to be messing with these settings on other peoples > machines. > The script code is in configure.in but is commented out. > > #fix_mac_groups() > #{ > #this is what the Mac OS X installer does... untested > # sudo mkdir /var/spool/uucp > # sudo chmod 775 /var/spool/uucp > # sudo niutil -destroyval / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > # sudo niutil -appendprop / /groups/uucp users `sudo id > -p | grep > 'login' | sed 's/login.//'` > #} > > > The error is indicating that for some reason, rxtx is not > able to lock the > file and does think there is an active PID that has a lockfile. > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Mon Jul 11 23:17:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 06:17:46 +0100 (BST) Subject: [Rxtx] IT WORKS (sort of) In-Reply-To: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194283E80B8@misnts1.dalsemi.com> Message-ID: On Mon, 11 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Monday, July 11, 2005 6:48 PM > > To: Java RXTX discussion > > Cc: lyon at docjava.com > > Subject: Re: [Rxtx] IT WORKS (sort of) > > > > On Mon, 11 Jul 2005, Dr. Douglas Lyon wrote: > > > > > Trent: > > > Thanks a bunch for your help with this. > > > I must have run an installer that placed a jcl.jar into > > > the lib extensions without my realizing it. All this time > > > I was debugging with an old version of the libs. > > > > > > > > > You know, if we had a class for testing lib versions, we could > > > run it with a given library path, just to make sure the versions > > > were correct. > > > > > > The makefile could say something like: > > > > > > test: > > > java -jar rxtx.jar > > > java -jar rxtx.jar -Djava.library.path=. Main > > > > > > Then we could be sure that all the shared object libs and class path > > > come from the same working directory. > > > > > > As to checking what might be loaded, by accident, > > > I would think that the Java part of the library should have > > a java program > > > that is independent of the loading of the native lib. > > > This way you can run: > > > java -jar rxtx.jar > > > And it prints info about the lib, without loading the native lib. > > > To print info about the native lib and the java lib, you > > might write: > > > java -jar rxtx.jar -Djava.library.path=. Main > > > This could even enumerate the ports, showing the proper > > connectivity. > > > > > > Thanks again for your help with this. Now, I am getting a new error: > > > Devel Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7pre20 > > > Java lib Version = RXTX-2.1-7pre20 > > > trying to open:/dev/tty.modem > > > gnu.io.PortInUseException: Unknown Application > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > [snip] > > > > > > Any ideas? > > > > > > > The user needs to be in group uucp to work. Again the Enumerate test > > application should be enough to see if things are working. > > You can also > > compile rxtx with locking disabled at configure time. > > > > The auto* does not currently mess with the system > > configuration like the > > GUI IDE setup does. That means you need to do this yourself > > right now. I > > don't want to be messing with these settings on other peoples > > machines. > > The script code is in configure.in but is commented out. > > > > #fix_mac_groups() > > #{ > > #this is what the Mac OS X installer does... untested > > # sudo mkdir /var/spool/uucp > > # sudo chmod 775 /var/spool/uucp > > # sudo niutil -destroyval / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > # sudo niutil -appendprop / /groups/uucp users `sudo id > > -p | grep > > 'login' | sed 's/login.//'` > > #} > > > > > > The error is indicating that for some reason, rxtx is not > > able to lock the > > file and does think there is an active PID that has a lockfile. > > > > I can confirm that I'm seeing the same error as Doug on Mac OS X (as I > mentioned earlier, when I noticed psmisc was missing). Disabling lockfile > support works for me for now. I was already setup for uucp, but I went > ahead and ran your script anyways and I still get the same error when I try > to open the port using lockfiles. > OK. I'm trying to bring in a third group here before I look further at this. Maybe Patrick will speak up; I cant say more. We will get through this Mac OS X but I'm jumping through hoops at the moment :) The disable lockfiles works I understand. I'll step through the code for locking when Patrick's machines are online too. It would be nice to have a consistant method of using rxtx and lockfiles at that point. The best thing to do may be to use liblock which I think is the best way to go on Linux. I'll have to examine the Mac OS X support but the licenses are 100% OK with each other. -- Trent Jarvi tjarvi at qbang.org From diego at grupoclave.com Tue Jul 12 07:58:56 2005 From: diego at grupoclave.com (Diego Roig Seigneur) Date: Tue, 12 Jul 2005 10:58:56 -0300 Subject: [Rxtx] IOException on zero length write Message-ID: Hello, I started using RXTX after hitting a severe bug with Sun's CommApi version 2.0 on Windows: When you close and open the SerialPort, some resources are leaked. If you repeat that enough time, the application ends throwing an OutOfMemory exception. Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when you write a zero length byte array using OutputStream.write(). rxtx throws an IOException generating the following stack trace: RXTXPort.writeArray(byte[], int, int, boolean) line: not available [native method] RXTXPort$SerialOutputStream.write(byte[]) line: 1131 Modem.send(byte[]) line: 64 <--- Here I write the zero length array. Is this an expected behavior (it works without throwing in Sun's CommApi), a known issue or just a plain bug? Thanks, Diego Roig Seigneur. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/1736b002/attachment-0011.html From ricardo.trindade at emation.pt Tue Jul 12 09:11:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 12 Jul 2005 16:11:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42BC6582.2070805@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> Message-ID: <42D3DD8E.2040101@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050712/88a1b28e/attachment-0011.html From taj at www.linux.org.uk Tue Jul 12 11:37:00 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 12 Jul 2005 18:37:00 +0100 (BST) Subject: [Rxtx] IOException on zero length write In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Diego Roig Seigneur wrote: > Hello, > > I started using RXTX after hitting a severe bug with Sun's CommApi version > 2.0 on Windows: When you close and open the SerialPort, some resources are > leaked. If you repeat that enough time, the application ends throwing an > OutOfMemory exception. > > Now I'm using rxtx-2.1-7pre17-i386-pc-mingw32 , and I found a problem when > you write a zero length byte array using OutputStream.write(). rxtx throws > an IOException generating the following stack trace: > > RXTXPort.writeArray(byte[], int, int, boolean) line: not available > [native method] > RXTXPort$SerialOutputStream.write(byte[]) line: 1131 > Modem.send(byte[]) line: 64 <--- Here I write the zero length > array. > > Is this an expected behavior (it works without throwing in Sun's CommApi), a > known issue or just a plain bug? > Sounds like a simple bug. But did you expect the write to do anything? We can just check for 0 length and return in the java code. That would work for you? -- Trent Jarvi tjarvi at qbang.org From foldedplaces at hotmail.com Tue Jul 12 14:04:38 2005 From: foldedplaces at hotmail.com (Jim Hirst) Date: Tue, 12 Jul 2005 20:04:38 +0000 Subject: [Rxtx] Mac OS X help Message-ID: Hi all, I'm a newbie to Java, as well as a newbie to programming.  I'm learning to hack on my own.  I came across RXTX, and wanted to install it onto my mac, and I'm not getting usable results.  The latest version supplied on your site returns "file missing" errors when I load it into Apple's XCode to try to compile it.  And the slightly older version that your site supplies (the makefile) needs special groups permissions that I cannot get working on my unit (I'm using my corporate-supplied computer to learn Java without full access to permissions). The versions I just tried are the latest on the downloads page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. Is there anything simpler?  If I can get a hold of a premade RXTX.jar file, can I use that for programming?  (like I said, I'm a newbie, so I'm not that sharp with all of my possible options here). many thanks, jim From taj at www.linux.org.uk Wed Jul 13 00:09:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:09:37 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D3DD8E.2040101@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: Hi Ricardo Here are the current w32 and linux binaries. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip and the source. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip The system has CMSPAR in the include files so it should be working but It has not been tested well. On Tue, 12 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 00:29:09 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 07:29:09 +0100 (BST) Subject: [Rxtx] Mac OS X help In-Reply-To: References: Message-ID: On Tue, 12 Jul 2005, Jim Hirst wrote: > Hi all, > > I'm a newbie to Java, as well as a newbie to programming.? I'm learning to > hack on my own.? I came across RXTX, and wanted to install it onto my > mac, and I'm not getting usable results.? The latest version supplied on > your site returns "file missing" errors when I load it into Apple's XCode to > try to compile it.? And the slightly older version that your site supplies > (the > makefile) needs special groups permissions that I cannot get working on my > unit (I'm using my corporate-supplied computer to learn Java without full > access to > permissions). The versions I just tried are the latest on the downloads > page, rxtx-2.1-7pre17, and rxtx-2.0-7pre1. > > Is there anything simpler?? If I can get a hold of a premade RXTX.jar file, > can I use that for programming?? (like I said, I'm a newbie, so I'm not that > sharp with all of my possible options here). Hi Jim RXTX provides access to RS232 devices over USB. That is the dongle with 9 pin D connectors. RXTX does not provide raw USB support. So if you are trying to plug in a USB cammera or something like that, rxtx will not work. But if you want to use a RS232 device it should work. I think the GUI installer is working if you know what to look for but I've never used it. Maybe one of the Mac OS X users can help there. or you can search the mail archives as I think this was answered before. You can also try what we are working on for auto* tools. ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip unzip rxtx-2.1-CVS-20050612.zip mkdir rxtx-2.1-CVS-20050612/build cd rxtx-2.1-CVS-20050612/build ../configure --disable-lockfiles make install There is a known problem with lockfiles but doing the disable command above means you wont use lockfiles (and dont have to worry about group lock). -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Wed Jul 13 05:16:49 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 07:16:49 -0400 Subject: [Rxtx] macosx and lockfiles Message-ID: Hi All, Scott writes: ------- I can confirm that I'm seeing the same error as Doug on Mac OS X (as I mentioned earlier, when I noticed psmisc was missing). Disabling lockfile support works for me for now. I was already setup for uucp, but I went ahead and ran your script anyways and I still get the same error when I try to open the port using lockfiles. Scott --------- I ran: ../configure --disable-lockfiles from the build folder. I then ran a make and re-ran the test: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException Did I disable the lockfiles correctly? For a good time, I added the Keyspan 19HS device, to make sure enumeration would pick it up and to resolve any possible conflicts that the serial ports might have: java -Djava.library.path=. OpenCloseTest Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20 Java lib Version = R-testing-XTX-2.1-7pre20 /dev/tty.modem:attempting open-close /dev/tty.modem:PortInUseException /dev/cu.modem:attempting open-close /dev/cu.modem:PortInUseException /dev/tty.USA19H181P1.1:attempting open-close /dev/tty.USA19H181P1.1:PortInUseException /dev/cu.USA19H181P1.1:attempting open-close /dev/cu.USA19H181P1.1:PortInUseException /dev/tty.usbserial:attempting open-close /dev/tty.usbserial:PortInUseException /dev/cu.usbserial:attempting open-close /dev/cu.usbserial:PortInUseException /dev/tty.Bluetooth-PDA-Sync:attempting open-close /dev/tty.Bluetooth-PDA-Sync:PortInUseException /dev/cu.Bluetooth-PDA-Sync:attempting open-close /dev/cu.Bluetooth-PDA-Sync:PortInUseException /dev/tty.Bluetooth-Modem:attempting open-close /dev/tty.Bluetooth-Modem:PortInUseException /dev/cu.Bluetooth-Modem:attempting open-close /dev/cu.Bluetooth-Modem:PortInUseException So, while enumeration is working perfectly, listing all the ports... the open-close is not, even with lock files disabled (assuming I did not do something dumb). Just to be sure that I know what the library path is on the system, I wrote a little program, to check what the JVM is doing. The output of the program is: java LibraryPathUtils The getLibraryPath= . /Users/lyon/Library/Java/Extensions /Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java found:5 items I will append the program, below. Thus, I am pretty sure I am loading the correct libs, now. Does anybody have any ideas about getting the serial ports working? Scott: Perhaps you have a different version of the libraries than I do... Did I disable the locking correctly? Thanks! - Doug import java.util.StringTokenizer; public class LibraryPathUtils { public static void main(String[] args) { printLibraryPaths(); } public static void printLibraryPaths() { System.out.println("The getLibraryPath="); String s[] = getLibraryPaths(); print(s); } public static void print(Object o) { System.out.println(o); } public static void print(Object s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i]); System.out.println("found:" + s.length + " items"); } public static void print(Class s[]) { if (s == null) return; for (int i = 0; i < s.length; i++) System.out.println(s[i].getName()); System.out.println("found:" + s.length + " Classes"); } public static String[] getLibraryPaths() { return parsePath(System.getProperty("java.library.path")); } /** * Input a path separator delimited set of directories and return one * per string element in an array. */ private static String[] parsePath(String classPath) { String pathSeparator = System.getProperty("path.separator"); StringTokenizer st = new StringTokenizer( classPath, pathSeparator); int n = st.countTokens(); String s[] = new String[n]; for (int i = 0; i < n; i++) s[i] = st.nextToken(); return s; } } From lyon at docjava.com Wed Jul 13 07:08:37 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 13 Jul 2005 09:08:37 -0400 Subject: [Rxtx] version increments Message-ID: Hi All, I have created a new version of RXTX to represent no locks, for macos x use. In SerialImp.c: JNIEXPORT jstring JNICALL RXTXVersion(nativeGetVersion) (JNIEnv *env, jclass jclazz ) { return (*env)->NewStringUTF( env, "R-testing-XTX-2.1-7pre20noLock" ); } And in RXTXVersion.java I use: static { System.loadLibrary( "rxtxSerial" ); Version = "R-testing-XTX-2.1-7pre20noLock"; } To reflect the new, unsafe, versions (since serial port conflicts can result). Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = R-testing-XTX-2.1-7pre20noLock Java lib Version = R-testing-XTX-2.1-7pre20noLock /dev/tty.modem:attempting open-close /dev/tty.modem:worked! So, open-close now works. The problem lies in having to remember to delete the old librxtxSerial.jnilib from the present pwd, since that is in the library path. Probably the make clean should do that... Even better would be a means of making versions a function of the time at which they are made, to make sure of synchronization. I wonder if a sed script could insert the date and time into the version string of the RXTXVersion.java and SerialImp.c files. Such a sed script (or even java program) could be run during the make or config process. Anyhow, all seems well now; Scott, Trent, thanks for your help, you guys are great! - Doug From ricardo.trindade at emation.pt Wed Jul 13 09:30:30 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:30:30 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> Message-ID: <42D53396.3030906@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/348bc943/attachment-0011.html From ricardo.trindade at emation.pt Wed Jul 13 09:39:45 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:39:45 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D53396.3030906@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> Message-ID: <42D535C1.60905@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8e4405e5/attachment-0011.html From ricardo.trindade at emation.pt Wed Jul 13 09:50:28 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 16:50:28 +0100 Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: <42D53844.40909@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/ecebd822/attachment-0011.html From taj at www.linux.org.uk Wed Jul 13 11:05:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:05:56 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D53844.40909@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: liblock gets around adding users to group lock. Here is a library without liblock. Just rename it librxtxSerial.so on your system. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:46:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:46:46 +0100 (BST) Subject: [Rxtx] Re: License Question In-Reply-To: <60057059@web.de> References: <60057059@web.de> Message-ID: On Wed, 13 Jul 2005, Sven K?hne wrote: > > Hallo > > Pleas help me, i dont understand Licence(LGPL). > > If i only use your rxtx library, wath i have to do? > > Is it enough to tell that i use your library or i have to show everyone my source code? > There are many fine details that even lawyers get excited about but intent is 9/10's of the law. Here is the intent with rxtx. We are not interested in the source code or licenses to programs that link to RXTX. You can use rxtx and later decide to go with something else if you like and RXTX will not change anything about your software or licenses. The rxtx license requires that source to rxtx is made available to people you ship rxtx to. If you link to rxtx, you do not need to provide your application code, just the code to rxtx. If you point people to rxtx.org for downloads and are not using code in rxtx other than linking to it, you have no responsibilities. If you do not modify rxtx but do ship the library, just pointing to the source code file on www.rxtx.org and giving them a copy of the license is enough. Though we offer downloads as a convenience and the responsibility is yours to make sure rxtx source code is available to your users when you ship compiled libraries. If you modify rxtx, you need to provide the source code with your modifications to the people you ship rxtx to if they request it. It would be nice if you sent changes to us (rxtx.org) but you are not required to; only people recieving your compiled libraries can insist on the rxtx source with all modifications from you. You also must notify users that rxtx is LGPL and provide a copy of the LGPL license that comes with rxtx if you ship rxtx. README.rxtx and LICENSE.rxtx files are fine for this purpose for instance. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 11:53:15 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 18:53:15 +0100 (BST) Subject: [Rxtx] version increments In-Reply-To: References: Message-ID: > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = R-testing-XTX-2.1-7pre20noLock > Java lib Version = R-testing-XTX-2.1-7pre20noLock > /dev/tty.modem:attempting open-close > /dev/tty.modem:worked! > > So, open-close now works. The problem lies in having to remember > to delete the old librxtxSerial.jnilib from the present pwd, since > that is in the library path. Probably the make clean should do that... > Even better would be a means of making versions a function of the > time at which they are made, to make sure of synchronization. > > I wonder if a sed script could insert the date and time into the version > string of the RXTXVersion.java and SerialImp.c files. > > Such a sed script (or even java program) could be run during the make > or config process. > Yes.. the version information could be more complete. I was thinking of modifying version info to something like the following. rxtx version-patch version-builder at build machine-build number-date So everything like its been but more information on the end. The other modification would be a main() in RXTXVersion.java that prints out the current version information. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jul 13 12:22:05 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 19:22:05 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D535C1.60905@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> Message-ID: On Wed, 13 Jul 2005, Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and redhat). Is liblock > important ? > Name : lockdev-devel Relocations: (not relocatable) Version : 1.0.1 Vendor: Red Hat, Inc. Release : 7 Build Date: Sat 05 Mar 2005 04:51:54 AM MST Install Date: Sat 21 May 2005 07:12:53 PM MDT Build Host: tweety.build.redhat.com Group : System Environment/Libraries Source RPM: lockdev-1.0.1-7.src.rpm Size : 18714 License: LGPL Signature : DSA/SHA1, Tue 08 Mar 2005 05:20:19 PM MST, Key ID da84cbd430c9ecf8 Packager : Red Hat, Inc. Summary : The header files and a static library for the lockdev library. Description : The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers and a static library. /usr/include/baudboy.h /usr/include/lockdev.h /usr/include/ttylock.h /usr/lib/liblockdev.a /usr/lib/liblockdev.so /usr/share/man/man3/lockdev.3.gz I'm fairly sure Debian is the upstream for this package so it should not be very hard to find for gentoo. If you have current Redhat installed, the glibc should have the CMSPAR fix already. -- Trent Jarvi tjarvi at qbang.org From ricardo.trindade at emation.pt Wed Jul 13 16:29:10 2005 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 13 Jul 2005 23:29:10 +0100 Subject: [Rxtx] parity missed In-Reply-To: References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> Message-ID: <42D595B6.5040007@emation.pt> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050713/8ab1dec3/attachment-0011.html From taj at www.linux.org.uk Wed Jul 13 16:50:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 13 Jul 2005 23:50:46 +0100 (BST) Subject: [Rxtx] parity missed In-Reply-To: <42D595B6.5040007@emation.pt> References: <42BBD9ED.3060004@emation.pt> <42BC6582.2070805@emation.pt> <42D3DD8E.2040101@emation.pt> <42D53396.3030906@emation.pt> <42D535C1.60905@emation.pt> <42D53844.40909@emation.pt> <42D595B6.5040007@emation.pt> Message-ID: That is the right build but I cut and paste the name wrong. ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock will work now. ls -l /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock && mv /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050612-no-liblock -rwxr-xr-x 1 root ftp 154702 Jul 13 13:01 /var/ftp/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock On Wed, 13 Jul 2005, Ricardo Trindade wrote: > Hi, > > ??? I noticed that the filename says 20/01/2005. Can you send me one > regarding this build : > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > thanks > Ricardo > > Trent Jarvi wrote: > > liblock gets around adding users to group lock. Here is a library without > liblock. Just rename it librxtxSerial.so on your system. > > ftp://www.qbang.org/pub/rxtx/librxtxSerial.so-CVS-20050120-no-liblock > > > On Wed, 13 Jul 2005, Ricardo Trindade wrote: > > > > Would it be possible to send me another binary, without liblock ? > > thanks > Ricardo > > Ricardo Trindade wrote: > I really can't find liblock (I'm trying in gentoo and > redhat). Is liblock important ? > > Ricardo Trindade wrote: > Hi, > > ??? Didn't work because I didn't have liblock. > I'll install liblock and let you know. > > thanks > Ricardo > > Trent Jarvi wrote: > > Hi Ricardo > > Here are the current w32 and linux binaries. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612-bins.zip > > and the source. > > ftp://www.qbang.org/pub/rxtx/rxtx-2.1-CVS-20050612.zip > > The system has CMSPAR in the include files so it should be working but It > has not been tested well. > > On Tue, 12 Jul 2005, Ricardo Trindade wrote: > > > > Hi, > > ??? Still regarding this issue, any chance we can get a current > release/snapshot that supports parity ? > > ??? I can do testing. > > thanks > Ricardo > > > Ricardo Trindade wrote: > Hi, > > ??? I'll test the snapshot for partiy, and if it doesn't work > I'll let you know. > > ??? If you want to announce the release on the list I'll be > able to test it faster. > > thanks > Ricardo > > > Trent Jarvi wrote: > > On Fri, 24 Jun 2005, Ricardo Trindade wrote: > > > > Hi, > > I have a "parity missed error". From previous posts I believe this > has to do with CMSPAR not being defined. > I checked out 2.1 head from CVS. How can I make sure I do a proper > build and CMSPAR is defined ? Perhaps it would be good to have a release > snapshot that has this, I think the latest snapshot > (rxtx-2.1-CVS-20050120-bins) doesn't work in regards to parity. > > Another question I have, is why must this depend on kernel headers, > why can't it be defined in the RXTX source ? > > > > I used to cheat and grab the CMSPAR from the kernel headers because glibc > did not have it. Now rxtx uses the glibc headers and we have a patch in > glibc I trust that handles this. It would not be right to override glibc > and it wasnt right to use the kernel headers (it really did cause > problems). > > You can override glibc for now with the following in the top of > SerialImp.c > > # define CMSPAR 010000000000 > > You can check if your distro headers have this right bit looking for the > above in bits/termios.h. It should look like this: > > #ifdef __USE_MISC > # define CIBAUD 002003600000 /* input baud rate (not used) */ > # define CMSPAR 010000000000 /* mark or space (stick) parity */ > # define CRTSCTS 020000000000 /* flow control */ > #endif > > If it is not defined, please file a bug with your distro as rxtx is not > the only thing that will be broken on that distro. > > I was going to release new cvs snapshots last weekend but got tied up. > I'll do it this weekend. I also need to get custom baudrate patches into > the cvs snapshot. > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > ________________________________________________________________________ > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > > > > > > > > > -- Trent Jarvi tjarvi at qbang.org From vlado.handziski at gmail.com Thu Jul 14 03:17:51 2005 From: vlado.handziski at gmail.com (Vlado Handziski) Date: Thu, 14 Jul 2005 11:17:51 +0200 Subject: [Rxtx] Re: Licensing issues with using RXTX2.1 in the javax.comm namespace In-Reply-To: References: <49453.130.149.49.19.1119602234.squirrel@mail.tkn.tu-berlin.de> Message-ID: <697986ec050714021757aab78a@mail.gmail.com> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From toct1c at yahoo.fr Thu Jul 14 12:04:52 2005 From: toct1c at yahoo.fr (toct1c) Date: Thu, 14 Jul 2005 20:04:52 +0200 Subject: [Rxtx] I2C connection Message-ID: <200507142004.52621.toct1c@yahoo.fr> Hi, I'd like to use an I2C DAC. But I don't know how to connect it to my computer. I guess it is on the serial port, but how can I do that ? In addition, if I have to use an electronic circuit, could somebody tell me which one it is ? Thank you for your Help Toct1c ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com From lyon at docjava.com Thu Jul 14 15:02:28 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 14 Jul 2005 17:02:28 -0400 Subject: [Rxtx] jaddressbook, on the mac Message-ID: Hi All, I think I have a working JAddressbook for the mac now. It is at: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp It seems to dial through the built-in modem with no trouble, if you set it to cu.modem. There is a dial-set-up that enables this. Please let me know if you have any problems with it. Thanks! - DL From jasmine at electronpusher.org Thu Jul 14 15:06:15 2005 From: jasmine at electronpusher.org (Jasmine Strong) Date: Thu, 14 Jul 2005 22:06:15 +0100 Subject: [Rxtx] jaddressbook, on the mac In-Reply-To: References: Message-ID: <92e3066d0b96cde7f2df649f6fd9e9f5@electronpusher.org> On 14 Jul 2005, at 22:02, Dr. Douglas Lyon wrote: > Hi All, > I think I have a working JAddressbook for the > mac now. It is at: > http://show.docjava.com:8086/book/cgij/code/jnlp/ > addbk.JAddressBook.Main.jnlp > > It seems to dial through the built-in modem with no trouble, > if you set it to cu.modem. > There is a dial-set-up that enables this. That seems to work (!) -J. From handzisk at tkn.tu-berlin.de Mon Jul 18 06:17:46 2005 From: handzisk at tkn.tu-berlin.de (Vlado Handziski) Date: Mon, 18 Jul 2005 14:17:46 +0200 (CEST) Subject: [Rxtx] (no subject) Message-ID: <36662.130.149.49.19.1121689066.squirrel@mail.tkn.tu-berlin.de> On 6/24/05, Trent Jarvi wrote: > On Fri, 24 Jun 2005, Vlado Handziski wrote: > > > Hi all, > > > > let me first express my compliments on the great work you have done with > > the RXTX library. > > > > We have been using the library for some time, and we are at a point where > > we want to make our code public. For legacy reasons, the code that the > > RXTX library is bundled with, uses the javax.comm namespace. We have been > > using the ChangePackage script to change the RXTX2.1 package from gnu.io > > into javax.comm. We need the independent implementation since we want to > > be able to directly access /dev/ttyUSBx ports in linux and the CommAPI > > versions are just not as stable. > > > > On the download page, there is a comment that this is in violation of > > sun's license. Can someone shed more light on this. I was not aware that > > you can protect the names of the java packages. > > > > Best regards, > > Vlado > > > > I can't provide legal advice as I am not a lawyer. > > (v) may not create, or authorize your licensees to create additional > classes, interfaces, or subpackages that are contained in the "java", > "javax" or "sun" packages or similar as specified by Sun in any class file > naming convention; and > > The license is in the commapi package from Sun. The above is also in all > the EULA's you click through to download from Sun if I'm not mistaken. > > Simply put, the license taints developers that agree to it. For those > developers, Sun has control of the javax.comm namespace. > > It really does not make sense to put rxtx 2.1 in the javax.comm namespace. > > It will only cause confusion which I think is the point of the clause > above. The gnu.io namespace was perhaps a poor choice and just tossed in > when reviewing the license to get out of Sun's namespace. > > There is nothing in the rxtx license limiting your freedom in this fashion > though. Many companies are moving to gnu.io and some distribute it with > popular applications you would recognize. I'm tempted to ask you not > to contaminate rxtx 2.1 with the javax.comm namespace. > > You can certainly do /dev/ttyUSBx with rxtx 2.0 and stay in javax.comm > using Sun's package. rxtx 2.1 adds new classes and (clearly labeled) > extensions to existing classes (which I dont think you are using); it is > not just javax.comm. Hi again, for the last couple of days I've been trying to migrate back to 2.0 + comm.jar but I have problems getting /dev/ttyUSBx recognized as available ports. I've tried creating a gnu.io.rxtx.properties file with gnu.io.rxtx.SerialPorts=/dev/usb/ttyUSBx or passing it via -D to java, but it does not seem to work. Any hints? Best regards, Vlado Handziski From phm4 at kent.ac.uk Tue Jul 19 07:59:29 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 14:59:29 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? Message-ID: Hello, could some one please tell me how to initialise class CommPortIdentifier, so that the static method below will be able to return a serial port which matches the String s. I am using familiar linux on an ipaq and would be able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to be a bug in the place lab code which allways returns no such port. What made me wonder about the initialisation is that the first line they make use of the rxtx library is: serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); where port is /dev/bluetooth/rfcomm/1 Thank you for your help, Phil static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException { System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); CommPortIdentifier index = CommPortIndex; synchronized (Sync) { System.out.println("HELLO"); while (index != null) { if (index.PortName.equals(s)) break; index = index.next; } } if (index != null) return index; else { System.out.println("not found!" + s); throw new NoSuchPortException(); } } From phm4 at kent.ac.uk Tue Jul 19 08:15:38 2005 From: phm4 at kent.ac.uk (Philipp H. Mohr) Date: Tue, 19 Jul 2005 15:15:38 +0100 (BST) Subject: [Rxtx] CommPortIdentifier how to load all serial ports ? In-Reply-To: References: Message-ID: I should have said the error I am getting from placelab is: CommPortIdentifier:static initialization() Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 CommPortIdentifier:getPortIdentifier(/dev/bluetooth/rfcomm/1) HELLO not found!/dev/bluetooth/rfcomm/1 gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(Unknown Source) at org.placelab.util.GPSEcho.(Unknown Source) at org.placelab.util.GPSEcho.main(Unknown Source) Thanks, Phil On Tue, 19 Jul 2005, Philipp H. Mohr wrote: > > Hello, > > could some one please tell me how to initialise class CommPortIdentifier, > so that the static method below will be able to return a serial port which > matches the String s. I am using familiar linux on an ipaq and would be > able to use /dev/bluetooth/rfcomm/1 with placelab.org - but there seems to > be a bug in the place lab code which allways returns no such port. > What made me wonder about the initialisation is that the first line they > make use of the rxtx library is: > > > serialPort = (SerialPort)CommPortIdentifier.getPortIdentifier(port).open("GPSEcho", 2000); > > where port is /dev/bluetooth/rfcomm/1 > > > Thank you for your help, > Phil > > > static public CommPortIdentifier getPortIdentifier(String s) throws NoSuchPortException > { > System.out.println("CommPortIdentifier:getPortIdentifier(" + s +")"); > CommPortIdentifier index = CommPortIndex; > > synchronized (Sync) > { > System.out.println("HELLO"); > while (index != null) > { > if (index.PortName.equals(s)) break; > index = index.next; > } > } > if (index != null) return index; > else > { > > System.out.println("not found!" + s); > throw new NoSuchPortException(); > } > } > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- www.cs.kent.ac.uk/~phm4 From mdasht2004 at yahoo.com Tue Jul 19 14:28:07 2005 From: mdasht2004 at yahoo.com (mdasht) Date: Tue, 19 Jul 2005 13:28:07 -0700 (PDT) Subject: [Rxtx] Problem with RXTXComm SerialPort in Windows Message-ID: <20050719202807.35203.qmail@web50006.mail.yahoo.com> Hi all, I open an ObjectOutputStream using RXTX-2.1-7pre17 for communicating via RS232 SerialPort. my code is working nicely on Linux, but when I run my program on Windows I get this Error : java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1166) at java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at java.lang.Throwable.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeFatalException(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) any Ideas about this probelm? Regards, mdasht. --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050719/ab384dcb/attachment-0011.html From andre.gouvea at gmail.com Wed Jul 20 09:08:45 2005 From: andre.gouvea at gmail.com (Andre Felipe Pirre Gouvea) Date: Wed, 20 Jul 2005 12:08:45 -0300 Subject: [Rxtx] Linux parallel port don't inititialize Message-ID: <8f1ab6ba05072008084a044219@mail.gmail.com> Hi, I'm use slackware 10.1, kernel 2.4.29, I have been some problems with RXTX (2-0-7pre2), when I try to use the parallel port I get a java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method). Anyone can help-me ?! Thx, Pirr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20050720/3cb647f0/attachment-0011.html From lyon at docjava.com Mon Jul 25 05:49:16 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 25 Jul 2005 07:49:16 -0400 Subject: [Rxtx] jaddress book Message-ID: Hi All, The new JAddressBook program has now been tested with the Mac using Keyspan, Prolific-io and internal modem dialing. I have also tested it with Fedora Linux, using an external modem, as well as Windows XP, with an external modem. Speaker dialing now works too. It all works with webstart: http://show.docjava.com:8086/book/cgij/code/jnlp/addbk.JAddressBook.Main.jnlp Please check it out...I am looking for beta testers. Thanks! - Doug From kelly_w_plummer at raytheon.com Mon Jul 25 10:36:10 2005 From: kelly_w_plummer at raytheon.com (kelly plummer) Date: Mon, 25 Jul 2005 09:36:10 -0700 Subject: [Rxtx] SerialPort.read() problem Message-ID: I am using RXTX on suse 9.2, when I do a read it only returns ever 4th byte. when i view the stream using minicom every byte is present. I have read the java represents bytes with ints could this be the problem? kelly From tjarvi at qbang.org Sat Jul 9 08:12:21 2005 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 09 Jul 2005 14:12:21 -0000 Subject: [Rxtx] Re: Where, oh where do the native libs go? In-Reply-To: References: Message-ID: On Sat, 9 Jul 2005, Dr. Douglas Lyon wrote: > Hi Trent, > I am trying to make > sure that I am installing native libs, like: > librxtxSerial.jnilib > In the correct places, on a mac. > > Here is a list: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/librxtxSerial.jnilib > /System/Library/Java/Extensions/librxtxSerial.jnilib > /usr/lib/java/librxtxSerial.jnilib > > Also, I had to remove the: > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/RXTXcomm.jar > > So that I could control which RXTXcomm.jar was loaded into the class path. > > I am not sure, but I think that this is the one that gets loaded when it > appears > in the extensions, not the one under development. > > Getting the jar and native libs to match up is key. > However, I get: > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > I think we need a better means of version detection. Perhaps a console > message indicating the version loaded....I don't know. > > - Doug > native library /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ RXTXcomm.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2//Home/lib/ext I have no idea where the javax.comm is comming from. I don't see it in any of the rxtx source or build files. I'm not reproducing the error with the jnilib and jar in the working directory. Dont mix rxtx 2.0 and 2.1. Dont use javax.comm.properties with rxtx 2.1. If you can reproduce the problem with a small console program, I can try to take a look. RXTX will complain if it loads the wrong native library but we have not bumped the version in cvs. You can edit SerialImp.c and RXTXVersion.java to bump the version. I'd run something silly like find / -name RXTXcomm.jar;find / -name librxtxSerial.jnilib and remove all instances at this point. Did the small example I posted to the maillist work? From Philip.T.Gonia at nasa.gov Mon Jul 25 11:18:53 2005 From: Philip.T.Gonia at nasa.gov (Gonia, Philip T) Date: Mon, 25 Jul 2005 13:18:53 -0400 Subject: [Rxtx] Install fails on OS X 10.3.9 Message-ID: <08ede1d630d0c43af05c569935a47dd3@nasa.gov> Hi, I just tried to install RXTX on my G5 running OS X 10.3.9. It fails. Does this install, using the MACOSX_IDE/ForPackageMaker/RXTX.pkg, require root permissions or the use of the root account to install? I only have admin rights so if root is required this may be the issue. I am getting the following in the installer log: Jul 25 12:30:09 : RXTX 1.4 Installation Log Jul 25 12:30:09 : Opened from: /Users/pgonia/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg Jul 25 12:30:09 : Hardware Model: PowerMac7,3 @ 2000 MHz (x2), 1024 MB Jul 25 12:30:09 : Running OS Build: 7W98 Jul 25 12:30:09 : Installer Language: English Jul 25 12:30:10 : Requirement: requires "certain file content criteria" PASS for root=(none), domain=0 Jul 25 13:01:33 : === Starting check on volume / Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/WDC Combo Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/WDC Combo, domain=0 Jul 25 13:01:33 : === Starting check on volume /Volumes/Skeeterhawks iPod Jul 25 13:01:33 : Requirement: requires "certain file content criteria" PASS for root=/Volumes/Skeeterhawks iPod, domain=0 Jul 25 13:01:35 : Selected volume 'Macintosh HD' Jul 25 13:01:35 : Mounted at: / Jul 25 13:01:35 : OpenFirmware: first-boot/@0:3 Jul 25 13:01:35 : Partition type: HFS+ Jul 25 13:01:35 : Partition map: disk0s3 Jul 25 13:01:35 : Partition: 3 Jul 25 13:01:35 : Protocol: ATA Jul 25 13:01:35 : Media Type: Generic Jul 25 13:01:35 : Volume Size: 159907627008 Jul 25 13:01:44 : Starting install Jul 25 13:01:45 : Creating directory at /private/tmp/.RXTX.pkg.29846.installtNsgwc Jul 25 13:01:45 : Running task: /Users/**********/Downloads/rxtx-2.0-7pre1/MACOSX_IDE/ForPackageMaker/ RXTX.pkg/Contents/Resources/RXTX.pre_install Jul 25 13:01:45 : The pre-install or upgrade script in RXTX failed. Jul 25 13:01:48 : Install Failed Jul 25 13:01:48 : Error detected Jul 25 13:01:48 : Name: NSGenericException Jul 25 13:01:48 : Reason: The pre-install or upgrade script in RXTX failed. (code 255) Jul 25 13:01:48 : Aborted install. Any thoughts and/or help would be of great help. Thank you for your time, Philip From phil.gonia at adelphia.net Mon Jul 25 19:45:46 2005 From: phil.gonia at adelphia.net (Philip Gonia) Date: Mon, 25 Jul 2005 21:45:46 -0400 Subject: [Rxtx] MAC OS X Installer Message-ID: Hi, I just tried to install the RXTX system onto my G4 iMac running OS X 10.4.1. This installer crashes on this version of the OS. I don't know if this has been reported as yet. I was afraid that it would not run on this version of the OS but I was surprised that it causes the installer to crash. The generated report is long. I can provide it on request. Thank you for your time, Phil From fbalzarro at libero.it Tue Jul 26 02:12:07 2005 From: fbalzarro at libero.it (Fabio Balzarro) Date: Tue, 26 Jul 2005 10:12:07 +0200 Subject: [Rxtx] Error closing a port on PDA! Message-ID: Hi, I've found a problem when I close serial port in my PDA. Sometimes (I don't now why...) the error found was 5091124: RXTXPort:close detected Bad File Descriptor. After this error, PDA can't close 2 tasks and neither programs will work correctly. Then, the only way is soft reset. The number change every time. What can I do? I've tried my program under Windows ce 4.2 on PDA hp ipaq 5550 and PDA hp ipaq4150. Thanks Fabio ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From lavicera at hotmail.com Thu Jul 28 17:00:25 2005 From: lavicera at hotmail.com (Francisco Taveras) Date: Thu, 28 Jul 2005 23:00:25 +0000 Subject: [Rxtx] Virtual Machine Crash Message-ID: Hello to everybody. My name is Eduardo Taveras. I hava a fatal error trying to execute: CommPortIdentifier.getPortIdentifiers(); I have not very much experience in linux. My linux version is Mandrake and my java version is 1.5.0_04. The virtual machine crashs when i execute this command. The error obtained is this: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) # Problematic frame: # C [ld-linux.so.2+0x8483] # # An error report file with more information is saved as hs_err_pid4337.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted Please help me. Thanks. From taj at www.linux.org.uk Thu Jul 28 17:21:24 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 29 Jul 2005 00:21:24 +0100 (BST) Subject: [Rxtx] Virtual Machine Crash In-Reply-To: References: Message-ID: On Thu, 28 Jul 2005, Francisco Taveras wrote: > Hello to everybody. My name is Eduardo Taveras. > > I hava a fatal error trying to execute: > > CommPortIdentifier.getPortIdentifiers(); > > I have not very much experience in linux. My linux version is Mandrake and > my java version is 1.5.0_04. The virtual machine crashs when i execute this > command. The error obtained is this: > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x40008483, pid=4337, tid=1075152160 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing) > # Problematic frame: > # C [ld-linux.so.2+0x8483] If you have not done so already, you may try compiling rxtx from source with the mandrake tools. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 11:39:27 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 17:39:27 -0000 Subject: [Rxtx] Logging and WriteFile Message-ID: <42F2533D.1020706@uol.com.br> Hi, I couldn't find the implementations of mexWarnMsgTxt and mexErrMsgTxt. Is there a way to save the messages in a file? Secondly, is there a special reason why in serial_write (termios.c) the WriteFile function is used with overlapping? From taj at www.linux.org.uk Fri Jul 1 12:25:16 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 19:25:16 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F2533D.1020706@uol.com.br> References: <42F2533D.1020706@uol.com.br> Message-ID: On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Hi, I couldn't find the implementations of mexWarnMsgTxt and > mexErrMsgTxt. Is there a way to save the messages in a file? > Secondly, is there a special reason why in serial_write (termios.c) the > WriteFile function is used with overlapping? Those link to commercial libraries and should remain commented out. The libraries come with Matlab and their only use is to do something like println while in the Matlab environment. You are not missing anything by leaving those commented out if you are not in Matlab. You really need only one logging option but there are multiple available there that all report the same information. -- Trent Jarvi tjarvi at qbang.org From frank-list at uol.com.br Fri Jul 1 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:31 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E47.6070900@uol.com.br> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > From taj at www.linux.org.uk Fri Jul 1 13:12:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 1 Jul 2005 20:12:29 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E47.6070900@uol.com.br> References: <42F2533D.1020706@uol.com.br> <42F25E47.6070900@uol.com.br> Message-ID: I think the J2SE_LOG_MODE works that way. That was a contributed patch and I have not tried it. You may find that it needs minor improvements since I never heard feedback after putting the patch in. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jul 5 02:37:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 09:37:29 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: CVS rxtx 2.1 should notw build on Mac OS X with the auto tools. If this works we can put it in rxtx 2.0 also. CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make Make install should install the library properly. I added a function to the configure script to fix groups and create the lock directory but left it commented out. See fix_mac_groups(). I did not actually do make install as I'm not the superuser on the machine. I did look at the nm output and the libraries appear fine so far. Any feedback would be appreciated. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 10:10:42 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 11:10:42 -0500 Subject: [Rxtx] javax.comm Message-ID: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Doug, > I have an idea that we could create a single JNLP distro site > that we can > make reference to that would enable a uniform repository of > synchronized > signed native methods and jars for RXTX. > > For example, the one-wire Maxim folks have a real-nice approach where > their stuff makes reference to another JNLP file that > contains all the stuff we > need to make RXTX work. Check it out at: > http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm I'm the author of OneWireViewer, and those jnlp files. The main reason we switched the 1-Wire API for Java over to RXTX was so that we could set up exactly that kind of an app... Where a single-click brings down the app and any platform-specific drivers automatically. This wasn't possible with the javax.comm libraries at the time (though I believe workarounds have been posted now). > However, even they have problems on an unconfigured machine: > Specified adapter name "DS9097U" is not known ... < snipped rest of error message > > Wow, that is a show stopper! Unfortunately, "single-click" doesn't work _everywhere_. The only thing preventing "single-click" on linux and Mac is the serial port locking. If this is the correct way to use serial ports, I wonder why all the distro's don't set it up by default? Also, I don't have a Mac binary up yet. Trent posted an update today about fixing the OS X builds.. I'm going to give that a try and, if I can get a good binary out of it, I'll update the webstart files to support it. As it is now, RXTX is defined as a separate component from the rest of our app. And anyone is free to link to that .jnlp file and it's assoicated jars on our site (assuming bandwidth isn't crazy, though afaik we don't have a limit). Clearly you wouldn't want to go into production with something I could easily change (fixing my app maybe, but breaking yours)... But it may serve as a good reference point if you're debugging your own webstart apps. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 11:25:26 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:25:26 +0100 (BST) Subject: [Rxtx] javax.comm In-Reply-To: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219427F81FFA@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Unfortunately, "single-click" doesn't work _everywhere_. The only thing > preventing "single-click" on linux and Mac is the serial port locking. If > this is the correct way to use serial ports, I wonder why all the distro's > don't set it up by default? > > Also, I don't have a Mac binary up yet. Trent posted an update today about > fixing the OS X builds.. I'm going to give that a try and, if I can get a > good binary out of it, I'll update the webstart files to support it. > Hi Scott Thanks for joining in on the webstart discussion. I'm sure any input you would have in this area would be of great assistance. The intention with locking is to follow the OS's convention. With Mac, I honestly dont know if they have thought about this. Dmitry and I tried to figure out what to do there and settled on creating the locking directory but that may not be right. One could try building the Mac port iwth --disable-lockfiles as a configure time option and run two apps at once. See if they fight over incomming data or if the kernel handles the problem. We are not trying to push Mac into the FHS lockfiles, we just don't want to see data corruption caused by two programs opening the same port; a monumental waste of time to figure out for end users. With Linux, I would suggest using the recently posted liblockdev patch. I'll put that in CVS after I send this email. The liblockdev is enabled with --enable-liblock=yes at configure time. There is no need to add users to group lock on linux then. The library is fairly generic and could be used with other Unix like OS's. I expect the library will only be available on distros like RedHat/Fedora/SUSE/Mandra/Ubuntu/Gentoo/Debian.. and not embeded Linux which probably has minimal interest in webstart applications. -- Trent Jarvi tjarvi at qbang.org From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Fri, 01 Jul 2005 18:26:00 -0000 Subject: [Rxtx] Logging and WriteFile In-Reply-To: References: <42F2533D.1020706@uol.com.br> Message-ID: <42F25E29.3020903@newpos.com> Thanks for the clarification. But is there a way to save the calls to report_error to a file? Trent Jarvi wrote: >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and >>mexErrMsgTxt. Is there a way to save the messages in a file? >>Secondly, is there a special reason why in serial_write (termios.c) the >>WriteFile function is used with overlapping? >> >> > >Those link to commercial libraries and should remain commented out. The >libraries come with Matlab and their only use is to do something like >println while in the Matlab environment. You are not missing anything by >leaving those commented out if you are not in Matlab. > >You really need only one logging option but there are multiple available >there that all report the same information. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: francisco.guimaraes.vcf Type: text/x-vcard Size: 319 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050701/62585da9/francisco.guimaraes-0012.vcf From taj at www.linux.org.uk Tue Jul 5 11:47:57 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 18:47:57 +0100 (BST) Subject: [Rxtx] Logging and WriteFile In-Reply-To: <42F25E29.3020903@newpos.com> References: <42F2533D.1020706@uol.com.br> <42F25E29.3020903@newpos.com> Message-ID: Currently there is no facility for logging the native debugging code to a file. It would not be too hard to modify the native code to call the Zystem logging facility (that sounds fancier than it is at this point :). All you need to do is modify the report_error() to call z.reportln(). I just have not had interest because java println's are swallowed in the environment I work in but we could apply a patch if someone is motivated. On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > Thanks for the clarification. But is there a way to save the calls to > report_error to a file? > > Trent Jarvi wrote: > > >On Thu, 4 Aug 2005, Francisco Areas Guimaraes wrote: > > > > > > > >>Hi, I couldn't find the implementations of mexWarnMsgTxt and > >>mexErrMsgTxt. Is there a way to save the messages in a file? > >>Secondly, is there a special reason why in serial_write (termios.c) the > >>WriteFile function is used with overlapping? > >> > >> > > > >Those link to commercial libraries and should remain commented out. The > >libraries come with Matlab and their only use is to do something like > >println while in the Matlab environment. You are not missing anything by > >leaving those commented out if you are not in Matlab. > > > >You really need only one logging option but there are multiple available > >there that all report the same information. > > > > > > > -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 13:13:56 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 14:13:56 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Trent, > CVS rxtx 2.1 should notw build on Mac OS X with the auto > tools. If this works we can put it in rxtx 2.0 also. ... > Any feedback would be appreciated. I had a few problems. First, I just ran "../configure && make && sudo make install" and then tried a simple 1-Wire program. I got the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) .... Looking at the location of the exception, I assumed that it was failing to get a file lock, though the UnstatisfiedLinkError is unrelated to that issue. It looks like rxtx wanted to let me know that the serial port was already owned (through an exception), but ended up generating an unrelated exception when trying to figure out who the owner is (through native_psmisc_report_owner). Btw, I'm pretty sure no application is owning the serial port, but I'm new to Mac and I could be wrong. I did setup the appropriate group/dir and added myself. So, I tried it again with "--disable-lockfiles". This produced interesting behavior for me as I'd recently seen it with another of our API's. Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at www.linux.org.uk Tue Jul 5 13:24:36 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 5 Jul 2005 20:24:36 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB7DF@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > Trent, > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > tools. If this works we can put it in rxtx 2.0 also. > ... > > Any feedback would be appreciated. > > I had a few problems. First, I just ran "../configure && make && sudo make > install" and then tried a simple 1-Wire program. I got the following > exception: > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > native_psmisc_report_owner > at gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > .... > > Looking at the location of the exception, I assumed that it was failing to > get a file lock, though the UnstatisfiedLinkError is unrelated to that > issue. It looks like rxtx wanted to let me know that the serial port was > already owned (through an exception), but ended up generating an unrelated > exception when trying to figure out who the owner is (through > native_psmisc_report_owner). Btw, I'm pretty sure no application is owning > the serial port, but I'm new to Mac and I could be wrong. I did setup the > appropriate group/dir and added myself. Ah.. I need to add psmisc.c to that compile. You can get around that for now with the following added to SerialImp.c JNIEXPORT jstring JNICALL Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner (JNIEnv *env, jobject obj, jstring arg) { return (*env)->NewStringUTF(env, "Unknown Application"); } I'll fix this in CVS. It is easy enough to check if that function is linked in properly. > > So, I tried it again with "--disable-lockfiles". This produced interesting > behavior for me as I'd recently seen it with another of our API's. > Basically, all of our 1-Wire API for Java apps work just once, but if you > close the port and try again, it fails. In our Public Domain Kit for C, we > have some posix serial examples that I tried on Mac OS X. I noticed this > same behavior with those apps and I traced it to a point in the code where 1 > byte of data is written to the serial port and the "tcdrain" function is > called. This tcdrain call blocks forever and I can't figure out why. If I > unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the > Mac, if reboot the machine), it works again. I suspect rxtx is blocking on > this same tcdrain call, though I haven't actually traced it to that. > > If noone else has seen this behavior, I could blame it on the Keyspan usb > drivers for the usb-to-serial adapter I'm using. If anyone has any > suggestions on what I could try, I'd like to give it a shot. > Does it enumerate the ports? If not it could be some problem with the timed out read performed during enumeration. I'd suspect rxtx needs to restor termios defaults. I'll have to look more. -- Trent Jarvi tjarvi at qbang.org From Scott.Hughes at dalsemi.com Tue Jul 5 14:19:11 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 15:19:11 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> > -----Original Message----- > From: rxtx-bounces at mail.electronpusher.org > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > Sent: Tuesday, July 05, 2005 2:25 PM > To: Java RXTX discussion > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > Trent, > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > tools. If this works we can put it in rxtx 2.0 also. > > ... > > > Any feedback would be appreciated. > > > > I had a few problems. First, I just ran "../configure && > make && sudo make > > install" and then tried a simple 1-Wire program. I got the > following > > exception: > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > native_psmisc_report_owner > > at > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > .... > > > > Looking at the location of the exception, I assumed that it > was failing to > > get a file lock, though the UnstatisfiedLinkError is > unrelated to that > > issue. It looks like rxtx wanted to let me know that the > serial port was > > already owned (through an exception), but ended up > generating an unrelated > > exception when trying to figure out who the owner is (through > > native_psmisc_report_owner). Btw, I'm pretty sure no > application is owning > > the serial port, but I'm new to Mac and I could be wrong. > I did setup the > > appropriate group/dir and added myself. > > > Ah.. I need to add psmisc.c to that compile. > > You can get around that for now with the following added to > SerialImp.c > > JNIEXPORT jstring JNICALL > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > (JNIEnv *env, > jobject obj, jstring arg) > { > return (*env)->NewStringUTF(env, "Unknown Application"); > } > > I'll fix this in CVS. It is easy enough to check if that function is > linked in properly. > > > > > So, I tried it again with "--disable-lockfiles". This > produced interesting > > behavior for me as I'd recently seen it with another of our API's. > > Basically, all of our 1-Wire API for Java apps work just > once, but if you > > close the port and try again, it fails. In our Public > Domain Kit for C, we > > have some posix serial examples that I tried on Mac OS X. > I noticed this > > same behavior with those apps and I traced it to a point in > the code where 1 > > byte of data is written to the serial port and the > "tcdrain" function is > > called. This tcdrain call blocks forever and I can't > figure out why. If I > > unplug my usb-to-serial adapter and re-plug it (or, since > I'm away from the > > Mac, if reboot the machine), it works again. I suspect > rxtx is blocking on > > this same tcdrain call, though I haven't actually traced it to that. > > > > If noone else has seen this behavior, I could blame it on > the Keyspan usb > > drivers for the usb-to-serial adapter I'm using. If anyone has any > > suggestions on what I could try, I'd like to give it a shot. > > > > Does it enumerate the ports? If not it could be some problem > with the > timed out read performed during enumeration. > > I'd suspect rxtx needs to restor termios defaults. I'll have to look > more. Yes, each the 1-Wire API for Java apps do call the CommPortIdentifier.getPortIdentifiers() method and enumerates the list of ports returned. I google'd for various combinations of tcdrain and blocking forever and found one reference where someone had used the "set" termios without the "get", which inadvertently set it with some garbage or bad values. This caused tcdrain to block forever after a write. I couldn't find anything else that came close to explaining this behavior. Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From Scott.Hughes at dalsemi.com Tue Jul 5 19:58:21 2005 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 5 Jul 2005 20:58:21 -0500 Subject: [Rxtx] [FIXED] Mac OS X auto* builds Message-ID: <1809DA15308DD51180EE00508BCF2194281FB97E@misnts1.dalsemi.com> Trent, > I google'd for various combinations of tcdrain and blocking > forever and > found one reference where someone had used the "set" termios > without the > "get", which inadvertently set it with some garbage or bad > values. This > caused tcdrain to block forever after a write. I couldn't > find anything > else that came close to explaining this behavior. Finally got home to sit in front of my Mac and try this out.. First thing I tried was moving the USB-to-serial adapter to another USB port (right in the back of Mac Mini, instead of in monitor's USB hub)... And it worked perfectly! Move it back to monitor's hub, and tcdrain blocks forever after "open-close-open-write" sequence every time. I'll experiment with some other hubs later, for now I'm just excited to have it working. Since it appears to be USB related, I'm not sure what rxtx could do differently to make this work but I'd happily test any patches anyone would like to try. Thanks for your help... My feedback on the new auto* builds for Mac OS X has been updated to Excellent! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From lyon at docjava.com Wed Jul 6 04:36:34 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 06:36:34 -0400 Subject: [Rxtx] rxtx auto build on the mac Message-ID: In the autobuild for the mac, I get an error: checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home checking os.name Mac OS X checking os.arch ppc checking java.vendor Apple Computer, Inc. checking java.version 1.4.2_05 checking os.version 7.9.0 ../configure: line 1: LDFLAGS -module -framework JavaVM -framework IOKit -framework CoreFoundation: command not found ../configure: command substitution: line 6: syntax error near unexpected token `;;' ../configure: command substitution: line 6: `;;' ../configure: line 21791: +: command not found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make: *** No rule to make target `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. Past version of this file were located in: /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la However, in the current build: /Users/lyon/current/java/serial/rxtx/rxtx-devel/build These files are not present, as shown by: pwd /Users/lyon/current/java/serial/rxtx/rxtx-devel lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la I used: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot password is mousy cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../configure && make To run the make. Hey Trent: Thanks for working on this! - Doug From lyon at docjava.com Wed Jul 6 05:09:20 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 06 Jul 2005 07:09:20 -0400 Subject: [Rxtx] closing ports - lets break the dead lock! Message-ID: Hi Scott, Yeah, closing ports on a mac makes them unable to open. ----- You wrote: Basically, all of our 1-Wire API for Java apps work just once, but if you close the port and try again, it fails. In our Public Domain Kit for C, we have some posix serial examples that I tried on Mac OS X. I noticed this same behavior with those apps and I traced it to a point in the code where 1 byte of data is written to the serial port and the "tcdrain" function is called. This tcdrain call blocks forever and I can't figure out why. If I unplug my usb-to-serial adapter and re-plug it (or, since I'm away from the Mac, if reboot the machine), it works again. I suspect rxtx is blocking on this same tcdrain call, though I haven't actually traced it to that. If noone else has seen this behavior, I could blame it on the Keyspan usb drivers for the usb-to-serial adapter I'm using. If anyone has any suggestions on what I could try, I'd like to give it a shot. ------ I have seen the same results from PortIO and from the built-in modem on a Powerbook. I also have the Keyspan. Finally, I have even made use of the CubePort, made by Griffin, to test serial port control. See: http://www.griffintechnology.com/archive/serial/cport.html for more info about that. Here is the (unclean) work around: public void close() { if (OsUtils.isMacOs()) return; if (serialPort == null) return; if (inputStream != null) { try { inputStream.close(); inputStream = null; } catch (IOException e) { } } if (outputStream != null) { try { outputStream.close(); outputStream = null; } catch (IOException e) { } } serialPort.close(); serialPort.removeEventListener(); cpid.removePortOwnershipListener(this); serialPort = null; utils = null; } Using a singleton design pattern (in Utils), I can ensure that my code (at least) would detect any resource contention issues with the serial port. Basically, I just check to see if I am on a mac, then change the close operation to a no-op. This puts the UG in Ugly... Suggestion; let the application break the dead lock if the lock file is open...otherwise no progress will be made. For example, suppose process X opens the serial-port and then dies. Process Y can make no progress because it "thinks" the resource is locked. Prompt the user: Serial Port Locked: Would you like to use it anyway (this can cause a loss of data)? If the user selects "OK" then go ahead an take the resource, breaking the deadlock. Just a thought... - Doug From taj at www.linux.org.uk Wed Jul 6 13:41:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 6 Jul 2005 20:41:29 +0100 (BST) Subject: [Rxtx] rxtx auto build on the mac In-Reply-To: References: Message-ID: On Wed, 6 Jul 2005, Dr. Douglas Lyon wrote: > In the autobuild for the mac, I get an error: > > checking whether gcc needs -traditional... no > checking whether to enable maintainer-specific portions of Makefiles... no > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home > checking os.name Mac OS X > checking os.arch ppc > checking java.vendor Apple Computer, Inc. > checking java.version 1.4.2_05 > checking os.version 7.9.0 > ../configure: line 1: LDFLAGS -module -framework JavaVM -framework > IOKit -framework CoreFoundation: command not found > ../configure: command substitution: line 6: syntax error near > unexpected token `;;' > ../configure: command substitution: line 6: `;;' > ../configure: line 21791: +: command not found > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > make: *** No rule to make target > `powerpc-apple-darwin7.9.0/librxtxSerial.la', needed by `all'. Stop. > > Past version of this file were located in: > /Users/lyon/j4p/jars/rxtx-2.1-7pre17-i686-pc-linux-gnu/.libs/librxtxSerial.la > However, in the current build: > /Users/lyon/current/java/serial/rxtx/rxtx-devel/build > These files are not present, as shown by: > pwd > /Users/lyon/current/java/serial/rxtx/rxtx-devel > lyonPowerPook.local{lyon}122: find . | grep librxtxSerial.la > > I used: > CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot > password is mousy > > cvs login > cvs checkout -r commapi-0-0-1 rxtx-devel > cd rxtx-devel > mkdir build && cd build > ../configure && make > > To run the make. > > Hey Trent: Thanks for working on this! > - Doug > > I'll look at this first thing tomorrow. You may try running the autogen.sh script to see if that corrects the problem. I did try a clean checkout and it worked the other day but maybe something bad happened when I went back to Linux and checked things there. -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 12:06:31 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 11:06:31 -0700 (PDT) Subject: [Rxtx] Bad Data? Message-ID: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Hi, I've developed an applet that reads serial data and then post this to a server for further processing. I have had no problems doing this until I compared the applet data with an Active X control we created earlier that does the same thing. It seems the data read by the applet is different, oddly enough. I've given an example below: ActiveX 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ 0($ p($($ 08 `( Java ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ 0($ ?($($ 0? `( What might cause this discrepancy while using the rxtx library? ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From taj at www.linux.org.uk Thu Jul 7 12:21:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 19:21:46 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707180631.32672.qmail@web51403.mail.yahoo.com> References: <20050707180631.32672.qmail@web51403.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Hi, > > I've developed an applet that reads serial data and > then post this to a server for further processing. I > have had no problems doing this until I compared the > applet data with an Active X control we created > earlier that does the same thing. It seems the data > read by the applet is different, oddly enough. I've > given an example below: > > ActiveX > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ (0 ($ > 0($ p($($ 08 `( > > Java > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ (0 ($ > 0($ ?($($ 0? `( > > What might cause this discrepancy while using the rxtx > library? > > > I'd have two guesses. The first is your activeX control or a second Java application is still trying to read the port and now you have two applications fighting for the incoming data. The second guess is you are using unusual comm port settings that rxtx is not handling correctly. Perhaps you are using less common stop bit settings? w32 serial comm should work fine. It is hard to know everything. Is that part of a packet that would never change or may it change depending upon what the device recieves? -- Trent Jarvi tjarvi at qbang.org From whokilledhomer at yahoo.com Thu Jul 7 15:19:24 2005 From: whokilledhomer at yahoo.com (Tim Sarver) Date: Thu, 7 Jul 2005 14:19:24 -0700 (PDT) Subject: [Rxtx] Bad Data? In-Reply-To: Message-ID: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Trent, Many thanks for your response! The data provided below was taken from two different machines at two different times, so there wasn't a sharing issue over the same data. However, you mentioned non-normal common stop bits; I've included a snippet where I'm enumerating through available ports and setting such params (does this look suspect?): try { while (en.hasMoreElements()) { portId = (CommPortIdentifier) en.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL) && (!portId.isCurrentlyOwned())) { port = (SerialPort) portId.open("MyApp", 2000); port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setDTR(false); port.setRTS(false); port.addEventListener(this); port.notifyOnDataAvailable(true); ports.put(portId.getName(), port); System.out.println("Port Name: " + portId.getName()); } } } Also, to address your last question--parts of this stream will change depending on the data on a given card scanned into the device, in this implementation a golf score card. The data provided above was taken from the exact same score card though from two different machines (both running WinXP); we were doing this for testing purposes. --- Trent Jarvi wrote: > On Thu, 7 Jul 2005, Tim Sarver wrote: > > > Hi, > > > > I've developed an applet that reads serial data > and > > then post this to a server for further processing. > I > > have had no problems doing this until I compared > the > > applet data with an Active X control we created > > earlier that does the same thing. It seems the > data > > read by the applet is different, oddly enough. > I've > > given an example below: > > > > ActiveX > > 40 $ t( ( $00 $00 $ 0$`8 d( 0($ 0 $00 $ > (0 ($ > > 0($ p($($ 08 `( > > > > Java > > ?0 $ t( ( $00 $00 $ 0$`? ?( 0($ 0 $00 $ > (0 ($ > > 0($ ?($($ 0? `( > > > > What might cause this discrepancy while using the > rxtx > > library? > > > > > > > > I'd have two guesses. The first is your activeX > control or a second Java > application is still trying to read the port and now > you have two > applications fighting for the incoming data. > > The second guess is you are using unusual comm port > settings that rxtx is > not handling correctly. Perhaps you are using less > common stop bit > settings? > > w32 serial comm should work fine. It is hard to > know everything. Is that > part of a packet that would never change or may it > change depending upon > what the device recieves? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From taj at www.linux.org.uk Thu Jul 7 15:40:49 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 7 Jul 2005 22:40:49 +0100 (BST) Subject: [Rxtx] Bad Data? In-Reply-To: <20050707211924.11258.qmail@web51410.mail.yahoo.com> References: <20050707211924.11258.qmail@web51410.mail.yahoo.com> Message-ID: On Thu, 7 Jul 2005, Tim Sarver wrote: > Trent, > > Many thanks for your response! The data provided below > was taken from two different machines at two different > times, so there wasn't a sharing issue over the same > data. > > > However, you mentioned non-normal common stop bits; > I've included a snippet where I'm enumerating through > available ports and setting such params (does this > look suspect?): > > > try > { > while (en.hasMoreElements()) > { > portId = (CommPortIdentifier) en.nextElement(); > if ((portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > && (!portId.isCurrentlyOwned())) > { > port = (SerialPort) portId.open("MyApp", 2000); > port.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > port.setDTR(false); > port.setRTS(false); > port.addEventListener(this); > port.notifyOnDataAvailable(true); > ports.put(portId.getName(), port); > System.out.println("Port Name: " + > portId.getName()); > } > } > } > > > Also, to address your last question--parts of this > stream will change depending on the data on a given > card scanned into the device, in this implementation a > golf score card. The data provided above was taken > from the exact same score card though from two > different machines (both running WinXP); we were doing > this for testing purposes. > 9600 8N1. I'm not aware of any reason that would be a problem at all. You may examine the size/timing/.. of your reads or something along those lines. I dont think there is a communication problem. I would not expect one at least. Perhaps you are expecting timeout/threshold behavior but have not set them and are reading the data before its ariving. reads can return less data than you expect if the data is still ariving if timeout and threshold is not set. I'm not aware of how your reads are working though. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jul 7 21:58:28 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 8 Jul 2005 04:58:28 +0100 (BST) Subject: [Rxtx] [FIXED] Mac OS X auto* builds In-Reply-To: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF2194281FB85C@misnts1.dalsemi.com> Message-ID: On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > -----Original Message----- > > From: rxtx-bounces at mail.electronpusher.org > > [mailto:rxtx-bounces at mail.electronpusher.org] On Behalf Of Trent Jarvi > > Sent: Tuesday, July 05, 2005 2:25 PM > > To: Java RXTX discussion > > Subject: RE: [Rxtx] [FIXED] Mac OS X auto* builds > > > > On Tue, 5 Jul 2005, Scott Hughes wrote: > > > > > Trent, > > > > > > > CVS rxtx 2.1 should notw build on Mac OS X with the auto > > > > tools. If this works we can put it in rxtx 2.0 also. > > > ... > > > > Any feedback would be appreciated. > > > > > > I had a few problems. First, I just ran "../configure && > > make && sudo make > > > install" and then tried a simple 1-Wire program. I got the > > following > > > exception: > > > > > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > > > native_psmisc_report_owner > > > at > > gnu.io.CommPortIdentifier.native_psmisc_report_owner(Native Method) > > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > > .... > > > > > > Looking at the location of the exception, I assumed that it > > was failing to > > > get a file lock, though the UnstatisfiedLinkError is > > unrelated to that > > > issue. It looks like rxtx wanted to let me know that the > > serial port was > > > already owned (through an exception), but ended up > > generating an unrelated > > > exception when trying to figure out who the owner is (through > > > native_psmisc_report_owner). Btw, I'm pretty sure no > > application is owning > > > the serial port, but I'm new to Mac and I could be wrong. > > I did setup the > > > appropriate group/dir and added myself. > > > > > > Ah.. I need to add psmisc.c to that compile. > > > > You can get around that for now with the following added to > > SerialImp.c > > > > JNIEXPORT jstring JNICALL > > Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner > > (JNIEnv *env, > > jobject obj, jstring arg) > > { > > return (*env)->NewStringUTF(env, "Unknown Application"); > > } > > > > I'll fix this in CVS. It is easy enough to check if that function is > > linked in properly. > > > > > This should be fixed in CVS now. Also in CVS (which initially caused some build proglems for Mac OS X) is the liblockdev patch for Linux. This means you dont have to setup users in group lock and soforth to prevent programs from fighting over data. configure --enable-liblock=yes [cube:sanity_check-6-7/rxtx-devel/build] taj% nm powerpc-apple-darwin7.7.0/librxtxSerial.jnilib | grep psmisc 00005f80 T _Java_gnu_io_CommPortIdentifier_native_1psmisc_1report_1owner -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jul 8 07:08:06 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 08 Jul 2005 09:08:06 -0400 Subject: [Rxtx] the build works, but there is still a bug somewhere.... Message-ID: Hi All, The new CVS build works great, I tried it on two macs; Thanks Trent! Here is a build script that you can run to do the build. The password is mousy. Just cat it into a file, called build, then run: sh build CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot cvs login cvs checkout -r commapi-0-0-1 rxtx-devel cd rxtx-devel mkdir build && cd build ../